<ContentDialog
    x:Uid="CalibrateDialog"
    x:Class="NixExampleWinUI.Views.CalibrateContentDialog"
    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}"
    Closing="ContentDialog_Closing">

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

    <RelativePanel Width="420">
        <TextBlock x:Uid="CalibrateDialog_Message" 
                   x:Name="MessageTextBlock"
                   RelativePanel.AlignTopWithPanel="True"
                   RelativePanel.AlignLeftWithPanel="True"
                   RelativePanel.AlignRightWithPanel="True"
                   Style="{StaticResource BodyTextBlockStyle}"
                   TextWrapping="WrapWholeWords"/>
        <Button x:Name="AcceptButton"
                RelativePanel.Below="MessageTextBlock"
                RelativePanel.AlignRightWithPanel="True"
                IsEnabled="{x:Bind TileKeyTextBox.Text, Mode=OneWay, Converter={StaticResource StringNotEmptyToBooleanConverter}}"
                Margin="6,24,0,0"
                Click="AcceptButton_Click">
            <ToolTipService.ToolTip>
                <ToolTip x:Uid="CalibrateDialog_AcceptButton_ToolTip"/>
            </ToolTipService.ToolTip>
            <Button.Content>
                <FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="&#xE8FB;"/>
            </Button.Content>
        </Button>
        <TextBox x:Uid="CalibrateDialog_TextBox"
                 x:Name="TileKeyTextBox"
                 RelativePanel.Below="MessageTextBlock"
                 RelativePanel.LeftOf="AcceptButton"
                 RelativePanel.AlignLeftWithPanel="True"
                 Margin="0,24,6,0"/>
        <TextBlock x:Uid="CalibrateDialog_StatusMessage"
                   x:Name="StatusMessage"                   
                   Style="{StaticResource CaptionTextBlockStyle}"
                   RelativePanel.Below="TileKeyTextBox"
                   RelativePanel.AlignLeftWithPanel="True"
                   RelativePanel.AlignRightWithPanel="True"
                   Margin="{StaticResource SmallTopBottomMargin}"/>
        <ProgressBar x:Name="CalibrationProgressBar"
                     RelativePanel.AlignTopWith="StatusMessage"
                     RelativePanel.AlignBottomWith="StatusMessage"
                     RelativePanel.AlignLeftWith="StatusMessage"
                     RelativePanel.AlignRightWith="StatusMessage"
                     IsIndeterminate="True"
                     Visibility="Collapsed"/>
    </RelativePanel>
</ContentDialog>