<TextBox Height="30" Width="300" TextWrapping="Wrap" Text="TextBox">
<TextBox.Template>
<ControlTemplate>
<ControlTemplate.Resources>
<Storyboard x:Key="GetShadow">
<DoubleAnimation AutoReverse="True"
RepeatBehavior="Forever"
Timeline.DesiredFrameRate="30"
Storyboard.TargetName="ShadowEffect"
Storyboard.TargetProperty="Opacity"
From="0"
To="1"
Duration="00:00:03" />
</Storyboard>
</ControlTemplate.Resources>
<TextBox>
<TextBox.Effect>
<DropShadowEffect x:Name="ShadowEffect"
BlurRadius="10"
Direction="270"
Opacity="0"
ShadowDepth="3"
Color="Gray" />
</TextBox.Effect>
</TextBox>
<ControlTemplate.Triggers>
<Trigger Property="IsVisible" Value="true">
<Trigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource GetShadow}" />
</Trigger.EnterActions>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</TextBox.Template>
</TextBox>