C
C#4mo ago
Pandetthe

Wpf combobox problem

Hi! I came across an interesting problem today and I don't know how to overcome it. I have ObservableCollection<CustomWindow> where CustomWindow is including Window class and has public string property Example. I am using it as an ItemSource for combobox with DisplayNamePath="Example". Dropdown list is being displayed correctly but after selecting any option from it, selection box is still empty and I get System.Windows.Data Error: 40 : BindingExpression path error: 'Example' property not found on 'object' ''Frame' (Name='ViewControl')'. BindingExpression:Path=Example; DataItem='Frame' (Name='ViewControl'); target element is 'TextBlock' (Example=''); target property is 'Text' (type 'String')
1 Reply
Pandetthe
Pandetthe4mo ago
Any ideas?