I have a problem understanding one style definition in Windows 8 apps.
When you create a metro style app with VS, there is also a folder named
Are common
created. Inside this folder there is a file called
StandardStyles.xaml
The following snippet from this file:
<DataTemplate x:Key="Standard250x250ItemTemplate"> <Grid HorizontalAlignment="Left" Width="250" Height="250"> <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}"> <Image Source="{Binding Image}" Stretch="UniformToFill"/> </Border> <StackPanel VerticalAlignment="Bottom" Background="{StaticResource ListViewItemOverlayBackgroundThemeBrush}"> <TextBlock Text="{Binding Title}" Foreground="{StaticResource ListViewItemOverlayForegroundThemeBrush}" Style="{StaticResource TitleTextStyle}" Height="60" Margin="15,0,15,0"/> <TextBlock Text="{Binding Subtitle}" Foreground="{StaticResource ListViewItemOverlaySecondaryForegroundThemeBrush}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap" Margin="15,0,15,10"/> </StackPanel> </Grid> </DataTemplate>
What I do not understand here is the definition of a static resource, for example. for the border
Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}"
It's not about how you work with templates, bindings, and resources.
Where is this ListViewItemPlaceholderBackgroundThemeBrush located ?
Many thanks for your help.
Dimi
source share