<UserControl x:Class="RoslynPad.SaveDocumentDialog"
             x:ClassModifier="internal"
             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:RoslynPad"
             mc:Ignorable="d"
             d:DataContext="{d:DesignInstance local:SaveDocumentDialog}"
             MinWidth="300"
             BorderThickness="1"
             BorderBrush="Gray"
             Background="White">
    <StackPanel Margin="10">
        <TextBlock Text="Save Document"
                   Style="{StaticResource Title}" />
        <TextBox Name="DocumentTextBox"
                 KeyDown="DocumentText_KeyDown"
                 Text="{Binding DocumentName, UpdateSourceTrigger=PropertyChanged}"
                 TextChanged="DocumentName_TextChanged"
                 IsEnabled="{Binding AllowNameEdit}"
                 MaxLength="200"
                 Margin="0,10,0,0" />
        <StackPanel HorizontalAlignment="Right"
                    Orientation="Horizontal"
                    Margin="50,30,0,0">
            <Button Name="OverwriteButton"
                    Style="{StaticResource DialogButton}"
                    BorderBrush="Red"
                    Visibility="Collapsed"
                    Content="_Overwrite"
                    Click="Overwrite_Click"/>
            <Button IsDefault="True"
                    Style="{StaticResource DialogButton}"
                    Name="SaveButton"
                    Content="_Save"
                    Click="Save_Click" />
            <Button Content="_Dont Save"
                    Style="{StaticResource DialogButton}"
                    Visibility="{Binding ShowDontSave, Converter={StaticResource BooleanToVisibilityConverter}}"
                    Name="DontSaveButton"
                    Click="DontSave_Click" />
            <Button Content="_Cancel"
                    Style="{StaticResource DialogButton}"
                    IsCancel="True"
                    Click="Cancel_Click" />
        </StackPanel>
    </StackPanel>
</UserControl>
