Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

ItemData for ComboBox in C# /WPF

$
0
0
I am quite new to C#/WPF. I am trying to bind a combo box to a list of items encapsulated by a class with members id and name in XAML. I am actually displaying the name in the combo box. I also need to associate the corresponding id to each name so that on selecting the name from the combo , I can get the associated id. Is there any method to do this in WPF? ie. is there any way to bind the id also ? Earlier there was the ItemData property with combo boxes.

Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>