I am not able to redefine the Template of an AppBarButton
inside BottomAppBar
in a Windows Phone 8.1 project.
In Visual Studio XAML designer it changes (it shows "button 2" text), but when I deploy it to the phone or to the emulator, the default template is applied.
I tried to right click the control, "Edit template", "Edit a copy...", but it's not available. Is it possible, to redefine this template?
My XAML code (just a very simplified example):
<Page.BottomAppBar>
<CommandBar>
<CommandBar.SecondaryCommands>
<AppBarButton
Label="button">
<AppBarButton.Template>
<ControlTemplate>
<TextBlock
Text="button 2" />
</ControlTemplate>
</AppBarButton.Template>
</AppBarButton>
</CommandBar.SecondaryCommands>
</CommandBar>
</Page.BottomAppBar>
I have Windows 8.1 Pro with Visual Studio Community 2013 Update 4 installed.
You can definitely right click and edit a copy. I just did this recently. Try putting a temporary AppBarButton at the top of your page and right click that one. Here is the default style in case you need it:
No, it is not possible to customize the app bar on Windows Phone 8.1 beyond the foreground and background colors. On Windows Phone the app bar is system UI rather than app as UI.
If you want to customize your app bar buttons you can put them in a custom panel docked at the bottom of the page instead of in a Page.BottomAppBar