How can I get SelectedItem and show Headers using ItemsControl?
问题 I am working on WPF Windows Application. I'm using ItemsControl to show collection list. Working on this I found there is no SelectedItem property in ItemsControl. Then how can I get the Selected Item from the ItemsControl. And also How can I display the Headers of ItemsControl. <ItemsControl ItemsSource="{Binding CustomSalesProducts, Mode=TwoWay}"> <ItemsControl.Template> <ControlTemplate TargetType="ItemsControl"> <Border> <ScrollViewer VerticalScrollBarVisibility="Auto"> <ItemsPresenter/>