Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
770
DisplayMemberPath validation broken with inherited properties
posted

XamComboEditor.CheckDisplayMemberPath mishandles the situation where DisplayMemberPath is declared in a base interface.  That is, given:

public interface IBase { string DisplayName { get; } }

public interface IDerived : IBase { }

public class Derived : IDerived { public string DisplayName { get { return "DisplayName"; } }

<ig:XamComboEditor ItemsSource="{Binding Items}" DisplayMemberPath="DisplayName"/>

If the ItemsSource is ObservableCollection<Derived>, everything works, but if ItemsSource is ObservableCollection<IDerived> CheckDisplayMemberPath throws, which I believe is a bug.

See the attached zip for a repro

Cheers

James

DisplayNameBinding.zip