WPF放大缩小动画效果
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
开发工具:VisualStudio2015
关键技术:WPF
作者:纳兹
撰写时间:2020年12月4日
首先进行页面布局,下面用button进行布局:
<Button BorderThickness="0" Width="100" Height="100"
Grid.Row="1" Grid.Column="1" Style="{StaticResource BtnBasic}">
<Button.Template>
<!--控件模板-->
<ControlTemplate>
<!--视觉树:Stretch="Uniform":等比拉伸-->
<Image Stretch="Uniform" Source="/ShopStoreClient;component/Image/member/member_03.jpg"/>
</ControlTemplate>
</Button.Template>
</Button>
然后定义鼠标移入放大页面资源:
<UserControl.Resources>
<Style TargetType="Button" x:Key="BtnBasic">
<Setter Property