Windows Apps中的自定义AppBarButton和AppBarToggleButton

时间:2015-11-17 12:36:18

标签: c# xaml windows-phone-8.1 windows-8.1 winrt-xaml

我尝试在我的Windows应用中创建自定义AppBarButtonAppBarToggleButton。在Visual Studio的设计视图中,我创建了一个自定义样式,我将其应用于我的按钮,如下所示:

<Page.Resources>
    <Style x:Key="NewAppBarStyle" TargetType="AppBarToggleButton">
    (...)
    </Style>
</Page.Resources>

<AppBarToggleButton Icon="Stop" Label="Style" Style="{StaticResource NewAppBarStyle}" />

在那个视图中一切正常。但是,每次我检查手机中的应用程序时,结果都不是我的预期。这是一些照片:

design view phone view

我不确定为什么会发生这种情况,如果有人能解释我为什么以及如何创建自定义AppBarButton,那将会是一个很大的帮助。

AppBarButtonAppBarToggleButton的默认样式。

您可以在此处找到要测试的项目:http://1drv.ms/1OdhBwX

0 个答案:

没有答案