自定义「属性故事面板」与「属性设置动画」
This commit is contained in:
@@ -30,7 +30,8 @@
|
||||
<ControlTemplate TargetType="{x:Type local:StateAdornerDecorator}">
|
||||
<!--使用「装饰器」容器做为控件模板的根对象,保证当前控件可以为任何控件提供装饰层-->
|
||||
<AdornerDecorator>
|
||||
<Border BorderBrush="{TemplateBinding BorderBrush}"
|
||||
<Border x:Name="dtRoot"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}">
|
||||
<Border.Background>
|
||||
<SolidColorBrush x:Name="BackgroundBrush" Color="White"/>
|
||||
@@ -50,6 +51,7 @@
|
||||
<VisualState x:Name="Selected">
|
||||
<Storyboard>
|
||||
<!--状态切换动画-->
|
||||
<local:PropertySetterAnimation Storyboard.TargetName="dtRoot" Storyboard.TargetProperty="Background" Value="Red" Duration="0:0:0"/>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="NormalHover">
|
||||
|
||||
Reference in New Issue
Block a user