Unable to cast object of type 'MS.Internal.NamedObject' to custom type

前端 未结 2 1634
不知归路
不知归路 2021-02-05 11:14

I am not new to WPF, but I can\'t figure out this problem:

I use an ObservableCollection that i bind to ComboBoxes, it\'s a

2条回答
  •  花落未央
    2021-02-05 11:41

    I've the same problem just now, and after I remove the static-ressource Style on the ItemContainerStyle and define it directly beneath ListBox, the problem went away.

    I had x:Name property on the elements in DataTemplate, and since I deleted them, the compilator didn't make it at all, probably. So I changed a way at all to make it sense.

    Hope this small trick will help you !

提交回复
热议问题