Tôi gặp sự cố khi hiểu một định nghĩa kiểu trong ứng dụng Windows 8 metro."ListViewItemPlaceholderBackgroundThemeBrush" nằm ở đâu?
Khi bạn tạo một ứng dụng phong cách metro với VS, đó cũng là một thư mục có tên
Common
tạo. Bên trong thư mục này có tập tin gọi là
StandardStyles.xaml
Bây giờ đoạn sau đây là từ tập tin này:
<!-- 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>
Những gì tôi không hiểu ở đây định nghĩa tài nguyên tĩnh, ví dụ cho Border
Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}"
Đó không phải là cách bạn làm việc với các mẫu và ràng buộc và tài nguyên.
Địa chỉ này ListViewItemPlaceholderBackgroundThemeBrush nằm ở đâu?
Rất cám ơn sự giúp đỡ của bạn.
Dimi