我是新的Windows 10通用Windows應用程序和XAML,我想知道是找到RoutedEvents列表。Windows 10路由事件列表
我想要在commandBar控件中設置動畫的省略號按鈕。我將圖像更改爲一個箭頭,點擊/點擊時需要旋轉。
我編輯了Blend中的控件,並試圖在Tap/Tapped/MouseDown路由事件中添加一個動畫。它既不適用也不適用 - 這些事件要麼不能被訪問,要麼不被識別。
這是我的代碼
<Button x:Name="MoreButton" Grid.Column="1" Foreground="{TemplateBinding Foreground}" MinHeight="{ThemeResource AppBarThemeCompactHeight}" Padding="16,23,16,0" Style="{StaticResource EllipsisButton}" VerticalAlignment="Top" Visibility="Visible">
<FontIcon x:Name="EllipsisIcon" FontSize="16"
FontFamily="{ThemeResource SymbolThemeFontFamily}"
Glyph="" Height="Auto" VerticalAlignment="Center">
<FontIcon.RenderTransform>
<RotateTransform x:Name="AnimatedRotateTransform" Angle="0" />
</FontIcon.RenderTransform>
<FontIcon.Triggers>
<EventTrigger RoutedEvent="Tap">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetName="AnimatedRotateTransform"
Storyboard.TargetProperty="Angle"
By="10"
To="360"
Duration="0:0:0.5"
FillBehavior="Stop" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</FontIcon.Triggers>
</FontIcon>
</Button>
謝謝
在UWP應用程序中不支持「EventTrigger」,是否要在xaml代碼中執行此操作,難道您不能在後面的代碼中旋轉它嗎? –