1 <UserControl x:Class="Pithos.Client.WPF.Shell.PithosBalloon"
\r
2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
\r
3 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
\r
4 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
\r
5 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
\r
7 xmlns:tb="http://www.hardcodet.net/taskbar"
\r
9 xmlns:my="clr-namespace:Pithos.Client.WPF.Shell" >
\r
10 <UserControl.Resources>
\r
11 <Storyboard x:Key="FadeIn">
\r
12 <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Opacity)">
\r
13 <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
\r
14 <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0.95"/>
\r
15 <SplineDoubleKeyFrame KeyTime="00:00:03" Value="0.95"/>
\r
16 <!-- <SplineDoubleKeyFrame KeyTime="00:00:05" Value="0"/>-->
\r
17 </DoubleAnimationUsingKeyFrames>
\r
19 <Storyboard x:Key="HighlightCloseButton">
\r
20 <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="imgClose" Storyboard.TargetProperty="(UIElement.Opacity)">
\r
21 <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.4"/>
\r
22 <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
\r
23 </DoubleAnimationUsingKeyFrames>
\r
25 <Storyboard x:Key="FadeCloseButton">
\r
26 <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="imgClose" Storyboard.TargetProperty="(UIElement.Opacity)">
\r
27 <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
\r
28 <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0.4"/>
\r
29 </DoubleAnimationUsingKeyFrames>
\r
31 <Storyboard x:Key="FadeBack">
\r
32 <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Opacity)">
\r
33 <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
\r
34 <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
\r
35 </DoubleAnimationUsingKeyFrames>
\r
37 <Storyboard x:Key="FadeOut" Completed="OnFadeOutCompleted" >
\r
38 <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Opacity)">
\r
39 <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
\r
40 <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0.2"/>
\r
41 </DoubleAnimationUsingKeyFrames>
\r
43 <my:BalloonIconConverter x:Key="BalloonConverter" />
\r
44 </UserControl.Resources>
\r
45 <UserControl.Triggers>
\r
46 <EventTrigger RoutedEvent="tb:TaskbarIcon.BalloonShowing">
\r
47 <BeginStoryboard Storyboard="{StaticResource FadeIn}" x:Name="FadeIn_BeginStoryboard"/>
\r
49 <EventTrigger RoutedEvent="Mouse.MouseEnter" SourceName="imgClose">
\r
50 <BeginStoryboard Storyboard="{StaticResource HighlightCloseButton}" x:Name="HighlightCloseButton_BeginStoryboard"/>
\r
52 <EventTrigger RoutedEvent="Mouse.MouseLeave" SourceName="imgClose">
\r
53 <BeginStoryboard Storyboard="{StaticResource FadeCloseButton}" x:Name="FadeCloseButton_BeginStoryboard"/>
\r
55 <EventTrigger RoutedEvent="Mouse.MouseEnter">
\r
56 <StopStoryboard BeginStoryboardName="FadeIn_BeginStoryboard"/>
\r
57 <BeginStoryboard x:Name="FadeBack_BeginStoryboard1" Storyboard="{StaticResource FadeBack}"/>
\r
59 <EventTrigger RoutedEvent="tb:TaskbarIcon.BalloonClosing">
\r
60 <BeginStoryboard Storyboard="{StaticResource FadeOut}" x:Name="FadeOut_BeginStoryboard"/>
\r
62 </UserControl.Triggers>
\r
63 <Grid x:Name="grid" MouseEnter="grid_MouseEnter" >
\r
64 <Grid.ColumnDefinitions>
\r
65 <ColumnDefinition Width="Auto"/>
\r
66 <ColumnDefinition Width="*"/>
\r
67 <ColumnDefinition Width="Auto"/>
\r
68 </Grid.ColumnDefinitions>
\r
69 <Grid.RowDefinitions>
\r
70 <RowDefinition Height="30" MaxHeight="30" />
\r
71 <RowDefinition Height="Auto" MinHeight="50" />
\r
72 </Grid.RowDefinitions>
\r
73 <Border Grid.RowSpan="2" Grid.ColumnSpan="3" Grid.Row="0" Grid.Column="0"
\r
74 HorizontalAlignment="Stretch"
\r
76 BorderThickness="1,1,1,1"
\r
77 BorderBrush="#FF379991">
\r
79 <DropShadowEffect Color="#FF747474"/>
\r
82 <LinearGradientBrush
\r
91 </LinearGradientBrush>
\r
92 </Border.Background>
\r
94 <StackPanel Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" VerticalAlignment="Stretch">
\r
96 HorizontalAlignment="Left"
\r
99 Stretch="None" Height="48" VerticalAlignment="Top"
\r
100 Source="/Images/Info.png"/>
\r
104 <TextBlock Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2"
\r
106 VerticalAlignment="Top"
\r
107 Foreground="Black"
\r
108 TextWrapping="Wrap"
\r
109 Text="{Binding Message,FallbackValue='This is a message'}"
\r
110 Width="Auto" Grid.RowSpan="2" MouseDown="TextBlock_MouseDown"
\r
114 <Path Grid.Column="1" Fill="#FFFFFFFF"
\r
117 VerticalAlignment="Top"
\r
119 Data="M26,107 L220.04123,107" SnapsToDevicePixels="True">
\r
121 <LinearGradientBrush
\r
122 EndPoint="0.973,0.5"
\r
123 StartPoint="0.005,0.5">
\r
130 </LinearGradientBrush>
\r
133 <TextBlock Grid.Column="1" Grid.ColumnSpan="2" Margin="0,10,10,0" VerticalAlignment="Top" Height="23.2" Text="{Binding Path=Title, FallbackValue='Pithos'}" TextWrapping="Wrap" Foreground="White" FontWeight="Bold"/>
\r
134 <Image Grid.Column="2" HorizontalAlignment="Right" Margin="0,10,10,0" VerticalAlignment="Top" Width="16" Height="16" Source="/Images/Close.png" Stretch="Fill" Opacity="0.7" ToolTip="Close Balloon" x:Name="imgClose" MouseDown="imgClose_MouseDown"/>
\r