Search code examples
xamlvisual-studio-2013windows-phone-8.1blend

Windows Phone 8.1 AppBarButton Template not editable


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.


Solution

  • 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