UWP - SymbolIcon example

MainPage.xaml

<Page
    x:Class="UniversalAppTutorials.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:UniversalAppTutorials"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <StackPanel 
        x:Name="StackPanel1" 
        Margin="50" 
        Orientation="Horizontal"
        Background="AliceBlue"
        Padding="50"
        >
        <!--- Display symbol icon using XAML -->
        <SymbolIcon
            Symbol="AddFriend"
            Margin="25"
            />
        
        <!--- Display symbol icon on a button -->
        <Button Padding="10">
            <StackPanel Orientation="Horizontal">
                <SymbolIcon Symbol="Save"/>
                <TextBlock Text="Save" Margin="15,0,0,0"/>
            </StackPanel>
        </Button>
    </StackPanel>
</Page>
MainPage.xaml.cs

using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml;


namespace UniversalAppTutorials
{
    public sealed partial class MainPage : Page
    {
        public MainPage()
        {
            this.InitializeComponent();

            // Initialize a new SymbolIcon instance
            SymbolIcon symbolIcon = new SymbolIcon(Symbol.Admin);

            // Set the margin of symbol icon
            symbolIcon.Margin = new Thickness(25);

            // Finally, put the symbol icon on stack panel
            // Programmatically create and display symbol icon
            StackPanel1.Children.Add(symbolIcon);
        }
    }
}