StandardStyles.xaml 发生了什么?

3
Windows Store 应用项目中的 StandardStyles.xaml 文件出了什么问题?我想在 AppBar 中添加一个“打印”按钮,但 IntelliSense 或属性窗格中都找不到它,但我知道它在 StandardStyles 文件中,因为我曾经使用过它(大约一年前)。为什么标准样式文件无处可寻,如何恢复并像以前一样正确使用它?
我在网上找到的所有内容都是一堆博客文章提到它已被删除并被 generic.xaml 替换,但没有提到如何将其添加到我的项目中。

2
http://timheuer.com/blog/archive/2013/10/29/remove-standardstyles-xaml-from-windows-8-1-winrt-projects.aspx - Hans Passant
@HansPassant 谢谢,但是 generic.xaml 并不包含 StandardStyles 中的所有内容。不过也没关系了,我会自己制作图标。 - jay_t55
2个回答

1
据我所知,在StandardStyles.xaml中从未出现过PrintAppBarButtonStyle,因为Microsoft希望您只使用设备下的Charms栏进行打印操作。
一般来说,语法<Button Style="{StaticResource XXXAppBarButtonStyle}" />已被新的AppBarButton控件所取代,用法如下:
<AppBarButton Icon="XXX" Label="Descriptive text" Click="AppBarButton_Click"/>

要查看所有可用图标的列表,请参考Symbol enumeration - 但不幸的是,这个列表中也缺少打印符号。


错误的。我已经使用过很多次了。我甚至已经在一年前发布了一个应用程序,使用了那个打印按钮。是的,我已经在使用AppBarButton。所以我的问题仍然存在,我们如何重新获得对StandardStyles文件的访问权限?它在哪里?为什么被删除了? - jay_t55

0

StandardStyles.xaml已被generic.xaml替换。在这里阅读更多


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接