Permalink
Cannot retrieve contributors at this time
Fetching contributors…
| <!-- <Snippet2> --> | |
| <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
| WindowTitle="VirtualizingStackPanel Sample" | |
| Height="150" | |
| VerticalAlignment="Top"> | |
| <Page.Resources> | |
| <XmlDataProvider x:Key="Leagues" Source="Leagues.xml" XPath="Leagues/League"/> | |
| <DataTemplate x:Key="NameDataStyle"> | |
| <TextBlock Text="{Binding XPath=@name}" FontFamily="Arial" FontSize="12" Foreground="Black"/> | |
| </DataTemplate> | |
| </Page.Resources> | |
| <Border HorizontalAlignment="Left" | |
| VerticalAlignment="Top" | |
| BorderBrush="Black" | |
| BorderThickness="2"> | |
| <ScrollViewer> | |
| <!-- <Snippet1> --> | |
| <StackPanel DataContext="{Binding Source={StaticResource Leagues}}"> | |
| <TextBlock Text="{Binding XPath=@name}" FontFamily="Arial" FontSize="18" Foreground="Black"/> | |
| <ListBox VirtualizingStackPanel.IsVirtualizing="True" | |
| ItemsSource="{Binding XPath=Team}" | |
| ItemTemplate="{DynamicResource NameDataStyle}"/> | |
| </StackPanel> | |
| <!-- </Snippet1> --> | |
| </ScrollViewer> | |
| </Border> | |
| </Page> | |
| <!-- </Snippet2> --> |