xaml how to create a trigger for textbox? active when typing
I have a textbox, i want add a trigger, when i click that textbox, the textbox wi开发者_高级运维ll change border color, untill typing is finish please help me useing xaml
Try this
<Style TargetType="{x:Type TextBox}">
<Style.Triggers>
<Trigger Property="IsFocused" Value="True">
<Setter Property="BorderBrush" Value="Red"/>
<Setter Property="BorderThickness" Value="2"/>
</Trigger>
</Style.Triggers>
</Style>
You are asking for a Trigger but a different styling for the Focused state would be my preferred way of doing this
精彩评论