TextBox 加阴影

 <Border.Effect>
                                    <DropShadowEffect x:Name="dse"
                                        BlurRadius="8"
                                        ShadowDepth="0"
                                         Color="#9966afe9" Opacity="0"
                                        ></DropShadowEffect>
                  </Border.Effect>
    <Trigger Property="IsFocused" Value="True">
                                    <Trigger.EnterActions>
                                        <BeginStoryboard>
                                            <Storyboard>
                                                <DoubleAnimation Storyboard.TargetName="dse" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.15">
                                                    <DoubleAnimation.EasingFunction>
                                                        <BackEase EasingMode="EaseInOut" />
                                                    </DoubleAnimation.EasingFunction>
                                                </DoubleAnimation>
                                            </Storyboard>
                                        </BeginStoryboard>
                                    </Trigger.EnterActions>
                                    <Setter Property="BorderBrush" Value="#66afe9"/>
                 </Trigger>
View Code

 讲代码复制到 TextBox 样式中Border中即可

posted @ 2018-11-22 14:17  Index_Zero  阅读(337)  评论(0编辑  收藏  举报