Last active
August 29, 2015 14:02
-
-
Save wtuts/961c55e5ea4841dc7c82 to your computer and use it in GitHub Desktop.
Data binding in a list box
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ListBox x:Name="mylistbox"> | |
<ListBox.ItemTemplate> | |
<DataTemplate> | |
<Grid Height="52" Width="auto"> | |
<TextBlock x:Name="nameblock" Text="{Binding name}" HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Top" Height="41" Width="331" FontSize="30" Margin="10,0,0,0" /> | |
<TextBlock x:Name="marksblock" Text="{Binding marks}" HorizontalAlignment="Left" Margin="391,0,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="41" Width="55" FontSize="30" /> | |
</Grid> | |
</DataTemplate> | |
</ListBox.ItemTemplate> | |
</ListBox> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment