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

How to name ListBox Items in xaml

$
0
0

I have a ListBox as defined below. How can I provide a name for each item in the ListBox via the xaml code?

<ListBox Grid.Row="0" Grid.Column="0"  Margin="17,8,15,26" Name="listBox1"
            Height="Auto"
            ItemsSource="{Binding Tables[0]}"
            DisplayMemberPath="ownerName"
            SelectedValuePath="ownerID" 
            ScrollViewer.VerticalScrollBarVisibility="Auto"
            />


Rob E.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



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