Button 動態刷新效果

<Button x:Name="btnUpdate" Click="btnUpdate_Click_1" BorderThickness="0" Width="40" Height="40" Margin="5,0,5,0" Style="{StaticResource ButtonStyle2}" PointerEntered="btn_PointerEntered" PointerExited="btn_PointerExited">
                            <Button.Resources>
                                <Storyboard x:Name="SpinningAnimation">
                                    <DoubleAnimation AutoReverse="False"
                   Duration="0:0:3"
                   From="0"
                   RepeatBehavior="Forever"
                   Storyboard.TargetName="sync_image"
                   Storyboard.TargetProperty="Angle"
                   To="360" />
                                </Storyboard>
                            </Button.Resources>

                            <Image x:Name="btnImg" Width="40" Height="40" Margin="-15,-7,-15,-7" Source="ms-appx:///Assets/img/synchronize-N.png" >
                                <Image.RenderTransform>
                                    <RotateTransform x:Name="sync_image" CenterX="20" CenterY="20"/>
                                </Image.RenderTransform>

                            </Image>
                            <!--<Button.Background>
                                <ImageBrush ImageSource="ms-appx:///Assets/img/synchronize-N.png"/>
                            </Button.Background>-->
                            
                        </Button>


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章