【问题标题】:AppBarButtonSyle for WinRTWinRT 的 AppBarButtonSyle
【发布时间】:2012-09-01 13:42:45
【问题描述】:

是否有可以查找 AppBarButtons 值的列表?

如果我在 StandardLayout.xaml 中查找,我会找到一些示例,像这样

<Style x:Key="ZoomOutButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
  <Setter Property="AutomationProperties.AutomationId" Value="ZoomOutButtonStyle"/>
  <Setter Property="AutomationProperties.Name" Value="Zoom Out"/>
  <Setter Property="Content" Value="&#xE1A4;"/>
</Style>

是否有类似值的列表

&#xE1A4;

谢谢。

【问题讨论】:

    标签: c# xaml windows-runtime


    【解决方案1】:

    运行字符映射程序并从字体列表中选择 Segoe UI 符号:-

    在您的示例中,您正在寻找的一点是, 只需忽略开头的 。您可以使用任何字体查看器程序或在Syncfusion Metro Studio FREE 上查看Syncfusion Metro Studio (2 intro min vid) 的免费版本,以获得更高级的图标操作。

    尽情尝试吧……

    【讨论】:

      【解决方案2】:

      在 Segoe UI Symbol 中查看完整的图标列表(在 StandardLayout.xaml 中)及其 unicode 值在http://kishore1021.files.wordpress.com/2012/09/appbar.png。 在每个图标下,您可以看到名称和 unicode 值。

      要使用其中一种样式,您只需在代码中使用以下 Xaml。

      <Button Style="{StaticResource RemoveAppBarButtonStyle}"/>
      

      将 StaticResource 旁边的单词替换为您想要的按钮。

      在自定义显示的按钮时,您可以从基本样式派生出自己的样式,并使用 setter 设置具有所需值的属性,如下面的代码所示。这里我显示一个地球图标,图标下方的文本是“获取位置”。

      <Style x:Key="GlobeAppBarButtonStyle" TargetType="Button" 
      BasedOn="{StaticResource AppBarButtonStyle}">
          <Setter Property="Content" Value="&#x128;" />
          <Setter Property="AutomationProperties.Name" Value="Get Location>
      </Style>
      

      【讨论】:

        【解决方案3】:

        您可以打开字符映射工具并将字体设置为 Segoe UI Symbol。值来自此字体。

        【讨论】:

        • 但我看不到 a 用某些值表示的项目,例如带有减号或加号的玻璃杯。
        【解决方案4】:

        在尝试使用 Segoe UI 符号时,我发现以下站点非常有价值:

        http://msdn.microsoft.com/en-us/library/windows/apps/jj841126.aspx

        如果我在那里找不到我想要/需要的东西,那么我通常使用Metro Studio

        【讨论】:

          猜你喜欢
          • 2012-01-10
          • 2011-12-05
          • 2011-12-27
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多