Feature Request: Add data binding support for default interface properties (C# 8)
Open
Enhancement Requested
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
C# 8 added support for default interface method and properties. Now we can write the following:
``` c#
public interface ITimeFeature
{
public DateTime CurrentTime => DateTime.Now;
}
class Item : ITimeFeature {}
```
However if we try to data bind to the **Item** object with **Path=CurrentTime**, it will fail to locate the property because it is inherited from the interface and not explicitly defined.
We can easily make this work now by creating a **CustomTypeDescriptor** which includes the defaulted properties. Can you make this built in, so we don't have to resort to writing descriptors?
Contributor guide
Assessment
This issue has not been assessed yet.