c# – “ListViewItemPlaceholderBackgroundThemeBrush”位于何
我在了解
Windows 8 metro应用程序中的一个样式定义时遇到问题.
使用VS创建metro风格应用程序时,还有一个名为的文件夹
创建.在这个文件夹里有一个名为的文件
现在,以下代码片段来自此文件: <!-- 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,15,0"/> <TextBlock Text="{Binding Subtitle}" Foreground="{StaticResource ListViewItemOverlaySecondaryForegroundThemeBrush}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap" Margin="15,10"/> </StackPanel> </Grid> </DataTemplate> 这里我不明白的是静态资源定义,例如为边界 Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" 它与您如何使用模板,绑定和资源无关. ListViewItemPlaceholderBackgroundThemeBrush位于何处? 非常感谢您的帮助. 迪米 解决方法
这是微软文档中应该出现的令人难以置信的令人沮丧的事情之一,但现在还没有.
ListViewItemPlaceholderBackgroundThemeBrush是系统画笔资源之一.它由Metro“Light”或“Dark”主题定义(无论您选择哪种应用). 您可以在Blend中查看系统画笔的完整列表. (不幸的是,我还没有找到任何方法在代码中枚举它们.似乎没有任何编程方式来检查主题资源.) 以下是一些可以让您进入完整列表的步骤. (当然,如果您已熟悉Blend,则可以缩写步骤.) >打开Expression Blend. 系统画笔资源列表将显示在列表框中. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- Binary XML file line #4: <item> tag requires a
- c# – 如何在系统上获取WCF命名管道列表?
- ruby-on-rails – Active Admin has_many可选择的记录列表
- swift – Inner didSet保护奇怪地扩展到全班?
- 为什么在iphone单元测试中实例化UIFont会导致崩溃?
- flex mx:Form
- react-router – component.find(‘a).prop(‘href’)返回u
- 解析xml在R中列出:当xml结构不同时,如何一致地访问节点?
- sqlite – 从文件加载时出现语法错误
- VB.NET中的静态成员