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
8 d:DesignHeight="120" d:DesignWidth="240"
\r
11 <UserControl.Resources>
\r
12 <Storyboard x:Key="FadeIn">
\r
13 <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Opacity)">
\r
14 <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
\r
15 <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0.95"/>
\r
16 <SplineDoubleKeyFrame KeyTime="00:00:03" Value="0.95"/>
\r
17 <!-- <SplineDoubleKeyFrame KeyTime="00:00:05" Value="0"/>-->
\r
18 </DoubleAnimationUsingKeyFrames>
\r
20 <Storyboard x:Key="HighlightCloseButton">
\r
21 <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="imgClose" Storyboard.TargetProperty="(UIElement.Opacity)">
\r
22 <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.4"/>
\r
23 <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
\r
24 </DoubleAnimationUsingKeyFrames>
\r
26 <Storyboard x:Key="FadeCloseButton">
\r
27 <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="imgClose" Storyboard.TargetProperty="(UIElement.Opacity)">
\r
28 <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
\r
29 <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0.4"/>
\r
30 </DoubleAnimationUsingKeyFrames>
\r
32 <Storyboard x:Key="FadeBack">
\r
33 <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Opacity)">
\r
34 <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
\r
35 <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
\r
36 </DoubleAnimationUsingKeyFrames>
\r
38 <Storyboard x:Key="FadeOut" Completed="OnFadeOutCompleted" >
\r
39 <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Opacity)">
\r
40 <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
\r
41 <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0.2"/>
\r
42 </DoubleAnimationUsingKeyFrames>
\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
65 HorizontalAlignment="Stretch"
\r
67 BorderThickness="1,1,1,1"
\r
68 BorderBrush="#FF997137">
\r
70 <DropShadowEffect Color="#FF747474"/>
\r
73 <LinearGradientBrush
\r
82 </LinearGradientBrush>
\r
83 </Border.Background>
\r
86 HorizontalAlignment="Left"
\r
89 Source="/Images/PithosTaskbar.png"
\r
90 Stretch="None" Height="72" VerticalAlignment="Top" />
\r
92 Margin="72,49.2,10,0"
\r
93 VerticalAlignment="Top"
\r
95 TextWrapping="Wrap"><Run Text="This is a user control. The animation uses the attached " Language="de-ch"/><Run FontStyle="Italic" FontWeight="Bold" Text="BalloonShowing " Language="de-ch"/><Run Text="event." Language="de-ch"/></TextBlock>
\r
100 Margin="72,38.2,34,0"
\r
101 VerticalAlignment="Top"
\r
103 Data="M26,107 L220.04123,107" SnapsToDevicePixels="True">
\r
105 <LinearGradientBrush
\r
106 EndPoint="0.973,0.5"
\r
107 StartPoint="0.005,0.5">
\r
114 </LinearGradientBrush>
\r
117 <TextBlock Margin="72,10,10,0" VerticalAlignment="Top" Height="23.2" Text="{Binding Path=BalloonText, ElementName=me, Mode=Default}" TextWrapping="Wrap" Foreground="#FFECAD25" FontWeight="Bold"/>
\r
118 <Image HorizontalAlignment="Right" Margin="0,10,10,0" VerticalAlignment="Top" Width="16" Height="16" Source="/Images/Close.png" Stretch="Fill" Opacity="0.4" ToolTip="Close Balloon" x:Name="imgClose" MouseDown="imgClose_MouseDown"/>
\r