WPF 使用EventTrigger时设置SouceName技巧
标签:origin sel sla toolbar dockpanel log tool https class
原文:WPF 使用EventTrigger时设置SouceName技巧
使用情节触发器时,如果有触发源/触发源控件时可以将情节触发器放置最顶级的面板控件的触发器中。
通过blend这个神器真的是可以学到不少东西。
代码:
//情节动画放置于顶级控制面板
"OnMouseLeftButtonUpForGrid">
"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="dockPanel">
"0" Value="0.675"/>
"0:0:0.4" Value="0.896"/>
"0:0:0.6" Value="0.997"/>
"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="dockPanel">
"0" Value="0.638"/>
"0:0:0.4" Value="0.835"/>
"0:0:0.6" Value="0.991"/>
"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="dockPanel">
"0" Value="111"/>
"0:0:0.4" Value="35.25"/>
"0:0:0.6" Value="0.75"/>
"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="dockPanel">
"0" Value="-66"/>
"0:0:0.4" Value="-30"/>
"0:0:0.6" Value="-1.5"/>
"UIElement.MouseLeftButtonUp" SourceName="grid1">
"OnMouseLeftButtonUpForGrid_BeginStoryboard" Storyboard="{StaticResource OnMouseLeftButtonUpForGrid}"/>
"dockPanel" RenderTransformOrigin="0.5,0.5">
"grid1" Height="40" DockPanel.Dock="Top" Background="Red">
"grid" Height="40" VerticalAlignment="Top" DockPanel.Dock="Top" Background="Green" RenderTransformOrigin="0.5,0.5">
WPF 使用EventTrigger时设置SouceName技巧
标签:origin sel sla toolbar dockpanel log tool https class
原文地址:https://www.cnblogs.com/lonelyxmas/p/12833942.html
评论