<UserControl
    x:Class="AppFramework.Views.MessageBoxView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:extensions="clr-namespace:AppFramework.Extensions"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:prism="http://prismlibrary.com/" 
    Width="380"
    Height="280"
    mc:Ignorable="d">
    <prism:Dialog.WindowStyle>
        <Style TargetType="Window">
            <Setter Property="prism:Dialog.WindowStartupLocation" Value="CenterScreen" />
            <Setter Property="ShowInTaskbar" Value="False" />
            <Setter Property="SizeToContent" Value="WidthAndHeight" />
            <Setter Property="WindowStyle" Value="None" />
            <Setter Property="AllowsTransparency" Value="True" />
            <Setter Property="Background" Value="Transparent" />
        </Style>
    </prism:Dialog.WindowStyle>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="1.5*" />
            <RowDefinition Height="auto" />
        </Grid.RowDefinitions>

        <Border
            Grid.RowSpan="3"
            CornerRadius="3"
            Opacity="1"
            Style="{StaticResource BorderStyle}" />

        <Image
            Width="50"
            Height="50"
            VerticalAlignment="Bottom"
            Source="/Assets/Images/info.png" />

        <StackPanel
            Grid.Row="1"
            HorizontalAlignment="Center"
            VerticalAlignment="Center">
            <TextBlock
                HorizontalAlignment="Center"
                FontSize="16"
                Text="{Binding Title}" />
            <TextBlock
                Margin="5,10"
                HorizontalAlignment="Center"
                Opacity="0.6"
                Text="{Binding Message}"
                TextWrapping="Wrap" />
        </StackPanel>

        <StackPanel
            Grid.Row="2"
            Margin="15"
            HorizontalAlignment="Center"
            VerticalAlignment="Bottom"
            Orientation="Horizontal">
            <Button
                Command="{Binding SaveCommand}"
                Content="{extensions:Translate Yes}"
                Style="{StaticResource SimpleButton}" />

            <Button
                Margin="10,0"
                Command="{Binding CancelCommand}"
                Content="{extensions:Translate No}"
                Style="{StaticResource SimpleButton}" />
        </StackPanel>
    </Grid>
</UserControl>
