NotifyIcon WPF

--------------
CHG   Merged partial classes of TaskbarIcon - no only 2 files.
ADD   Added attached events that indicate an opened popup/tooltip
ADD   Added storyboards in samples that make use of attached events.

git-svn-id: https://svn.evolvesoftware.ch/repos/evolve.net/WPF/NotifyIcon@56 9f600761-6f11-4665-b6dc-0185e9171623
This commit is contained in:
Philipp Sumi
2009-04-01 07:34:50 +00:00
parent 354ba1ca43
commit 1242596214
8 changed files with 682 additions and 618 deletions

View File

@@ -2,8 +2,22 @@
x:Class="Sample_Project.FancyPopup"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:tb="http://www.hardcodet.net/taskbar"
Height="215"
Width="300" x:Name="me">
<UserControl.Resources>
<Storyboard x:Key="RotateIcon">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="image" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
<SplineDoubleKeyFrame KeySpline="0,0.284,0.39,1" KeyTime="00:00:01.4000000" Value="360"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</UserControl.Resources>
<UserControl.Triggers>
<EventTrigger RoutedEvent="tb:TaskbarIcon.PopupOpened">
<BeginStoryboard Storyboard="{StaticResource RotateIcon}" x:Name="RotateIcon_BeginStoryboard"/>
</EventTrigger>
</UserControl.Triggers>
<Grid>
<Border
HorizontalAlignment="Stretch"
@@ -36,7 +50,16 @@
Width="72"
Height="72"
Source="Images\preferences.png"
Stretch="Fill" />
Stretch="Fill" x:Name="image" RenderTransformOrigin="0.5,0.5" >
<Image.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1"/>
<SkewTransform AngleX="0" AngleY="0"/>
<RotateTransform Angle="0"/>
<TranslateTransform X="0" Y="0"/>
</TransformGroup>
</Image.RenderTransform>
</Image>
<TextBlock
Margin="107,10,20,0"
TextWrapping="Wrap"