There is a DeBexpress ListBoxEdit . He set the property DisplayMember="Naimenovanie" . This means that the property "Naimenovanie" is taken from the object for display. And now the question. I redefined the ItemTemplate

 <dxe:ListBoxEdit.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding Naimenovanie}"> <TextBlock.InputBindings> <MouseBinding Command="{x:Static local:WndCatalogCommands.LoadBranchCommand}" MouseAction="LeftDoubleClick"/> </TextBlock.InputBindings> </TextBlock> </DataTemplate> </dxe:ListBoxEdit.ItemTemplate> 

What do I need to write in the Text property instead of {Binding Naimenovanie} , so that the value of the property specified in DisplayMember pulled up?

    1 answer 1

    Most likely, this way will not be possible to go.

    In the stock WPF DisplayMemberPath in ItemsControl , it installs an ItemTemplateSelector , and is thus a “fast template”. So either you use a custom template, and you register the necessary Binding , or you use DisplayMemberPath , and the template is taken from WPF for you.

    Most likely, DevExpress controls use the same strategy for compatibility with WPF stock. (But I can not double-check, I do not have their dll to decompile.)