<ContentDialog
    x:Uid="ActivateDialog"
    x:Class="NixExampleWinUI.Views.ActivateLicenseContentDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:helpers="using:NixExampleWinUI.Helpers"
    xmlns:local="using:NixExampleWinUI.Views"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Style="{StaticResource DefaultContentDialogStyle}"
    PrimaryButtonClick="ContentDialog_PrimaryButtonClick"
    IsPrimaryButtonEnabled="{x:Bind ViewModel.ActivateButtonEnabled, Mode=OneWay}"
    CloseButtonClick="ContentDialog_CloseButtonClick"
    Closing="ContentDialog_Closing">

    <ContentDialog.Resources>
        <helpers:ColorToSolidColorBrushConverter x:Key="ColorToSolidColorBrushConverter"/>
    </ContentDialog.Resources>

    <StackPanel Orientation="Vertical" 
                Width="420">
        <TextBlock x:Uid="ActivateDialog_Message" 
           x:Name="MessageTextBlock"
           Style="{StaticResource BodyTextBlockStyle}"
           TextWrapping="WrapWholeWords"/>
        <TextBlock x:Uid="ActivateDialog_OptionsTitle"
                   x:Name="OptionsTextBlock"
                   Style="{StaticResource BodyStrongTextBlockStyle}"
                   Margin="{StaticResource SmallTopMargin}"/>
        <TextBox x:Uid="ActivateDialog_OptionsTextBox"
                 x:Name="OptionsTextBox"
                 Margin="{StaticResource SmallTopBottomMargin}"
                 Text="{x:Bind ViewModel.Options, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
        <TextBlock x:Uid="ActivateDialog_SignatureTitle"
                   x:Name="SignatureTextBlock"
                   Style="{StaticResource BodyStrongTextBlockStyle}"
                   Margin="{StaticResource SmallTopMargin}"/>
        <TextBox x:Uid="ActivateDialog_SignatureTextBox"
                 x:Name="SignatureTextBox"
                 Margin="{StaticResource SmallTopMargin}"
                 Text="{x:Bind ViewModel.Signature, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
        <TextBlock x:Uid="ActivateDialog_StatusTextBlock"
                   x:Name="StatusTextBlock"
                   Style="{StaticResource CaptionTextBlockStyle}" 
                   Margin="{StaticResource SmallTopMargin}"
                   Text="{x:Bind ViewModel.StatusMessage, Mode=OneWay}"
                   Visibility="{x:Bind ViewModel.StatusMessageVisibility, Mode=OneWay}"
                   Foreground="{x:Bind ViewModel.StatusMessageColor, Mode=OneWay, Converter={StaticResource ColorToSolidColorBrushConverter}}"/>
    </StackPanel>
</ContentDialog>
