Suppose we have a ComboBox and nested ComboBoxItem in a WPF project:
<ComboBox Name="People" Height="30" VerticalAlignment="Top" IsEditable="True"> <ComboBoxItem> <StackPanel Orientation="Horizontal"> <TextBlock Padding="0 0 10 0">3845</TextBlock> <TextBlock>Andrew Invanov</TextBlock> </StackPanel> </ComboBoxItem> <ComboBoxItem> <StackPanel Orientation="Horizontal"> <TextBlock Padding="0 0 10 0">3845</TextBlock> <TextBlock>Sergey Petrov</TextBlock> </StackPanel> </ComboBoxItem> <ComboBoxItem> <StackPanel Orientation="Horizontal"> <TextBlock Padding="0 0 10 0">3845</TextBlock> <TextBlock>Valadimir Sidorov</TextBlock> </StackPanel> </ComboBoxItem> <ComboBoxItem> <StackPanel Orientation="Horizontal"> <TextBlock Padding="0 0 10 0">3845</TextBlock> <TextBlock>Nikolay Kuznetsow</TextBlock> </StackPanel> </ComboBoxItem> </ComboBox> If you do not intervene in the program part and select an item from the list, then a link to the ComboBoxItem object will be displayed:
Why is this happening and what should be done so that when you select an item in the ComboBox , what is needed is displayed?

ComboBox. Accordingly, he does not know exactly how to edit complex objects. Read here: stackoverflow.com/questions/1844156/… - trydexComboBoxin this way - user227049System.Windows.Controld.ComboBoxItem, but text content, for example,3845 Nikolay Kuznetsow(besides the text, I also saw examples with pictures). - Gleb