

#BUTTONBAR API FULL#
By default, it's shown with a text label and full padding.
#BUTTONBAR API HOW TO#
This example shows how to change the Icon and Label of an AppBarButton that's initially defined in Extensible Application Markup Language (XAML). Void AppBarButton_Click(object sender, RoutedEventArgs e) Pi.HorizontalAlignment = HorizontalAlignment.Center ĪppBarButton button4 = new AppBarButton() īottomAppBar.Primar圜ommands.Add(button4) void MainPage_Loaded(object sender, RoutedEventArgs e)ĬommandBar bottomAppBar = this.BottomAppBar as CommandBar ĪppBarButton button1 = new AppBarButton() īutton1.Icon = new SymbolIcon(Symbol.Like) īottomAppBar.Primar圜ommands.Add(button1) īi.UriSource = new Uri("ms-appx:///Assets/Slices.png") ĪppBarButton button2 = new AppBarButton() īottomAppBar.Primar圜ommands.Add(button2) įi.FontFamily = new Windows.UI.("Candara") ĪppBarButton button3 = new AppBarButton() īottomAppBar.Primar圜ommands.Add(button3) Here's how to create the same AppBarButton controls in code. This example shows AppBarButton controls with each type of icon: Get the app from the Microsoft Store or get the source code on GitHub. The WinUI 2 Gallery app includes interactive examples of most WinUI 2 controls, features, and functionality. Open the WinUI 2 Gallery app and see the AppBarButton in action Implements ICommandBarElement, ICommandBarElement2 Implements ICommandBarElement Public Class AppBarButton Public class AppBarButton : Button, ICommandBarElement, ICommandBarElement2 Public Class AppBarButton Public class AppBarButton : Button, ICommandBarElement / Ĭlass AppBarButton : Button, ICommandBarElement /// Ĭlass AppBarButton : Button, ICommandBarElement, ICommandBarElement2 Represents a templated button control to be displayed in an AppBar.
