我在理解Windows 8 metro應用程序中的一種樣式定義時遇到了問題。「ListViewItemPlaceholderBackgroundThemeBrush」位於何處?
當您使用VS Metro風格的應用程序,還有一個名爲
常見
創建
文件夾。此文件夾中有一個名爲
StandardStyles.xaml
現在下面的代碼片段是該文件的文件:
<!-- Grid-appropriate 250 pixel square item template as seen in the GroupedItemsPage and ItemsPage -->
<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>
我不明白這裏是靜態的資源定義,例如邊框
Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}"
這不是關於您如何使用模板和綁定以及資源。
這是哪裏ListViewItemPlaceholderBackgroundThemeBrush位於何處?
非常感謝您的幫助。
低糜