Hi,
png ist das Format .. kannst du auch nachschauen wenn du das lüfterrad anklickst und auf Darstellung gehst und dort das bild suchst :
Source="Content/images/running_fan_black.png"
eine seite mit solchen gimicks gibt es nicht - es ist auch kein
animiertes gif sondern ein script welches das Bild in x° regelmäßig dreht. Das muss programmiert werden und sieht dann so aus (für den Lüfter)
|
Quellcode
|
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
<UserControl
x:Name="this"
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:System="clr-namespace:System;assembly=mscorlib"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:im="clr-namespace:Microsoft.Expression.Interactivity.Media;assembly=Microsoft.Expression.Interactions"
mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300">
<UserControl.Resources>
<!--Below this value: trigger: StopAnimation-->
<System:Double x:Key="AnimationStop">100</System:Double>
<!--Above or equal this value: trigger: StartAnimation-->
<System:Double x:Key="AnimationStart">150</System:Double>
<!--Invert the trigger behavior-->
<System:Boolean x:Key="AnimationTriggerInvert">False</System:Boolean>
<Style TargetType="{x:Type Image}">
<Setter Property="RenderTransform">
<Setter.Value>
<RotateTransform Angle="0" CenterX="20" CenterY="18" />
</Setter.Value>
</Setter>
</Style>
<Storyboard x:Key="sb" >
<DoubleAnimation
Storyboard.TargetName="myImg"
Storyboard.TargetProperty="RenderTransform.Angle"
From="0"
To="360"
Duration="0:0:5"
SpeedRatio="1"
RepeatBehavior="Forever">
</DoubleAnimation>
</Storyboard>
</UserControl.Resources>
<Grid>
<Image
x:Name="myImg"
Source="Content/images/running_fan_black.png"
Opacity="1.0"
Height="40"
Width="40"
Margin="0,0,0,0"
Stretch="Uniform"
StretchDirection="Both">
<i:Interaction.Triggers>
<i:EventTrigger SourceObject="{Binding ElementName=this, Path=DataContext}" EventName="StartAnimation">
<im:ControlStoryboardAction Storyboard="{StaticResource sb}" ControlStoryboardOption="Play"/>
</i:EventTrigger>
<i:EventTrigger SourceObject="{Binding ElementName=this, Path=DataContext}" EventName="StopAnimation">
<im:ControlStoryboardAction Storyboard="{StaticResource sb}" ControlStoryboardOption="Stop"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</Image>
</Grid>
</UserControl>
|