<controls:CustomDialog x:Class="Memenim.Framework.Dialogs.NumericDialog"
                       d:DataContext="{d:DesignInstance local:NumericDialog}"
                       xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                       xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                       xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                       xmlns:local="clr-namespace:Memenim.Framework.Dialogs"
                       xmlns:markupLocalization="clr-namespace:RIS.Localization.UI.WPF.Markup;assembly=RIS.Localization.UI.WPF"
                       xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
                       xmlns:emoji="clr-namespace:Emoji.Wpf;assembly=Emoji.Wpf"
                       mc:Ignorable="d"
                       MinHeight="100" MinWidth="200"
                       Style="{StaticResource DefaultDialog}"
                       Title="{Binding Path=DialogTitle}"
                       KeyUp="Dialog_KeyUp">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="50"/>
        </Grid.RowDefinitions>

        <emoji:TextBlock Grid.Row="0"
                         Style="{DynamicResource Paragraph}"
                         Foreground="{DynamicResource MahApps.Brushes.ThemeForeground}"
                         Text="{Binding Path=DialogMessage}"
                         TextWrapping="Wrap"
                         Margin="10"/>
        <controls:NumericUpDown Grid.Row="1"
                                MinWidth="200" MinHeight="35"
                                Foreground="{DynamicResource MahApps.Brushes.ThemeForeground}"
                                Value="{Binding Path=InputValue, Mode=TwoWay}"
                                Minimum="{Binding Path=MinimumInputValue}"
                                Maximum="{Binding Path=MaximumInputValue}"
                                Interval="{Binding Path=IntervalInputValue}"
                                StringFormat="{Binding Path=StringFormatInputValue}"
                                ChangeValueOnTextChanged="True"
                                InterceptMouseWheel="True"
                                InterceptArrowKeys="True"
                                InterceptManualEnter="True"
                                TextAlignment="Center"
                                HorizontalAlignment="Center" VerticalAlignment="Center"
                                HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
                                Margin="10"/>
        <StackPanel Grid.Row="2"
                    Orientation="Horizontal"
                    HorizontalAlignment="Right" VerticalAlignment="Bottom"
                    Margin="5">
            <Button x:Name="OkButton"
                    Style="{DynamicResource MahApps.Styles.Button.Dialogs.Accent}"
                    Content="{markupLocalization:LocalizedString OkTitle}"
                    Margin="0 0 10 0"
                    Click="Ok_Click"/>
            <Button x:Name="CancelButton"
                    Style="{DynamicResource MahApps.Styles.Button.Dialogs}"
                    Content="{markupLocalization:LocalizedString CancelTitle}"
                    Visibility="{Binding Path=IsCancellable, Converter={StaticResource BooleanToVisibilityConverter}}"
                    Margin="0 0 10 0"
                    Click="Cancel_Click"/>
        </StackPanel>
    </Grid>
</controls:CustomDialog>
