初次尝试,用Expression Blend设计动画,然后在VS 2008中通过编码将动画指派给需要它的控件,感觉不错。 WPF is interesting! I'm a desinger and developer!! OutlookBar.xml: <UserControl x:Class="KingUCLs.OutlookBar" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="300" Width="300"> <UserControl.Resources> <Storyboard x:Key="Storyboard1"> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)"> <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0.5"/> <SplineDoubleKeyFrame KeyTime="00:00:02" Value="1"/> </DoubleAnimationUsingKeyFrames> </Storyboard> </UserControl.Resources> <Grid x:Name="gridMain"> <StackPanel x:Name="stackPanel1"> </StackPanel> </Grid></UserControl> OutlookBar.xaml.cs public partial class OutlookBar : UserControl 无需更多的语言了,又O了。 相关文章: 2021-09-14 2022-12-23 2022-12-23 2021-06-25