aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/MessageBox.xaml
blob: b1fe7ddccb3978b2afb367135ed22491bcfd95c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<UserControl x:Class="Tango.PanelPC.UI.Notifications.MessageBox"
             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:fa="http://schemas.fontawesome.io/icons/"
             xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
             xmlns:vm="clr-namespace:Tango.PPC.Common.Notifications;assembly=Tango.PPC.Common"
             xmlns:local="clr-namespace:Tango.PanelPC.UI.Notifications"
             mc:Ignorable="d" 
             d:DesignHeight="400" d:DesignWidth="800" d:DataContext="{d:DesignInstance vm:MessageBoxVM,IsDesignTimeCreatable=False}">
    <Grid>
        <Border Background="{StaticResource TangoPrimaryBackgroundBrush}" CornerRadius="10" Margin="10">
            <Border.Effect>
                <DropShadowEffect BlurRadius="10" />
            </Border.Effect>

            <Grid ClipToBounds="True">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="100"/>
                    <ColumnDefinition Width="75*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="100" />
                    <RowDefinition Height="1*" />
                    <RowDefinition Height="70"/>
                </Grid.RowDefinitions>

                <Image Grid.Row="0" Source="{Binding Icon}" Margin="20" />
                <TextBlock Grid.Column="1" Text="{Binding Title,TargetNullValue=Confirm}" Foreground="{Binding Brush,TargetNullValue={StaticResource TangoPrimaryAccentBrush}}" VerticalAlignment="Center" Margin="10" Style="{StaticResource TangoMessageBoxTitle}"></TextBlock>

                <Rectangle Stroke="{Binding Brush}" VerticalAlignment="Bottom" Grid.ColumnSpan="2" StrokeThickness="3" />

                <TextBlock Grid.Row="1" FontSize="{StaticResource TangoMessageBoxMessageFontSize}" Text="{Binding Message}" VerticalAlignment="Top" Grid.Column="1" TextWrapping="Wrap" Margin="10 20 10 10"></TextBlock>

                <Rectangle Stroke="{StaticResource TangoDividerBrush}" VerticalAlignment="Bottom" Grid.Row="1" Grid.ColumnSpan="2" StrokeThickness="1"/>
                
                <StackPanel Grid.Column="1" Grid.Row="2" HorizontalAlignment="Right" Orientation="Horizontal">
                    <touch:TouchButton x:Name="btnCancel" Width="180" Margin="2 0" Style="{StaticResource TangoMessageBoxButton}" Command="{Binding CloseCommand}" Visibility="{Binding HasCancel,Converter={StaticResource BooleanToVisibilityConverter}}">CANCEL</touch:TouchButton>
                    <touch:TouchButton x:Name="btnOK" Width="180" Margin="2 0" Style="{StaticResource TangoMessageBoxButton}" Command="{Binding OKCommand}">OK</touch:TouchButton>
                </StackPanel>
            </Grid>
        </Border>
    </Grid>
</UserControl>