89
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
1 <UserControl x:Class="Client.Controls.UIMessage"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
3 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
4 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
5 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
6 x:Name="UIMessageControl"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
7 mc:Ignorable="d">
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
8 <UserControl.Resources>
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
9 <SolidColorBrush x:Key="ErrorBrush" Color="#D5BD3630" />
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
10 <SolidColorBrush x:Key="InfoBrush" Color="#D759ABC3" />
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
11 <SolidColorBrush x:Key="SuccessBrush" Color="#E151A351" />
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
12 <SolidColorBrush x:Key="QuestionBrush" Color="#DCF9A938" />
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
13 <BitmapImage x:Key="ErrorImage" UriSource="../Images/error.png" />
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
14 <BitmapImage x:Key="InfoImage" UriSource="../Images/info.png" />
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
15 <BitmapImage x:Key="SuccessImage" UriSource="../Images/success.png" />
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
16 <BitmapImage x:Key="QuestionImage" UriSource="../Images/question.png" />
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
17 <Storyboard x:Key="FadeIn">
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
18 <DoubleAnimation BeginTime="0"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
19 Duration="00:00:02"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
20 From="0"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
21 Storyboard.TargetName="Display"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
22 Storyboard.TargetProperty="Opacity"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
23 To="1" />
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
24 </Storyboard>
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
25 <Storyboard x:Key="FadeOut">
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
26 <DoubleAnimation BeginTime="00:00:01"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
27 Duration="00:00:02"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
28 From="1"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
29 Storyboard.TargetName="Display"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
30 Storyboard.TargetProperty="Opacity"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
31 To="0" />
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
32 </Storyboard>
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
33 </UserControl.Resources>
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
34 <Grid x:Name="LayoutRoot" Background="White">
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
35
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
36 <Border x:Name="Display"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
37 Width="200"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
38 Height="70"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
39 Background="Pink"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
40 CornerRadius="5"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
41 Opacity="0">
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
42 <Grid>
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
43 <Grid.ColumnDefinitions>
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
44 <ColumnDefinition Width="60" />
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
45 <ColumnDefinition Width="*" />
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
46 </Grid.ColumnDefinitions>
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
47
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
48 <Image x:Name="Icon"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
49 Grid.Row="0"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
50 Grid.Column="0"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
51 Width="30"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
52 Height="30"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
53 HorizontalAlignment="Center"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
54 VerticalAlignment="Center"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
55 Stretch="Uniform" />
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
56 <TextBlock Grid.Column="1"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
57 VerticalAlignment="Center"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
58 Foreground="White"
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
59 Text="{Binding Path=Text,
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
60 ElementName=UIMessageControl,
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
61 UpdateSourceTrigger=PropertyChanged}" />
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
62 </Grid>
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
63 </Border>
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
64 </Grid>
|
stevenhollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
65 </UserControl>
|