首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 媒体动画 > CAD教程 >

WPF中一个小动画德实现解决办法

2014-01-12 
WPF中一个小动画德实现有一个lisbox,里面模板列中是小风扇图标,怎么让小风扇转起来? ListBox Grid.Row1

WPF中一个小动画德实现
有一个lisbox,里面模板列中是小风扇图标,怎么让小风扇转起来?
 <ListBox Grid.Row="1" Margin="-20,0,0,0" Name="LboxStoreHouses" BorderThickness="0" ItemsSource="{Binding List}"  Background="Transparent">
                <ListBox.ItemsPanel>    
                    <ItemsPanelTemplate>
                        <ComUc:AnimatingTilePanel  ItemHeight="90" ItemWidth="150"/>
                    </ItemsPanelTemplate>
                </ListBox.ItemsPanel>
                <ListBox.ItemTemplate>
                <DataTemplate>
            <Canvas x:Name="CanvasName"  Cursor="Hand" HorizontalAlignment="Left" Margin="2,0.5,0,0" Width="117" Height="100" VerticalAlignment="Top" d:LayoutOverrides="Height">

            <Image x:Name="FS" Height="8" Width="9" Canvas.Left="78" Canvas.Top="40" RenderTransformOrigin="0.5,0.5" Source="../Images/Shanzi.png" Visibility="Visible" >
                                <Image.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                   
                                </Image.RenderTransform>
                            </Image>
                     </Canvas>
                    </Grid>
                </DataTemplate>
 </ListBox.ItemTemplate>
            </ListBox>
[解决办法]
“感觉 Storyboard.TargetName="FS"就不行了吧”,为什么感觉不行?试了没?
[解决办法]
DataTemplate.Triggers —— EventTrigger —— Storyboard 

热点排行