-
Jul 23rd, 2014, 03:18 PM
#1
Thread Starter
Frenzied Member
Border Style change
I have a DockPanel where in VB.NET I'm adding borders to it at runtime. I'm adding a style resource to this border too.
Via VB.NET code I want to on the mouse over event change the style and then change it back on a mouse out event. How can I do this via VB.NET code?
-
Feb 27th, 2020, 01:17 AM
#2
Member
Re: Border Style change
Hii Kiwis,
You can change color of border using IsMouseOver property.
Try this code to change color of border at mouse over time.
Code:
<TextBox Text="ChangeBorder" x:Name="border">
<TextBox.Style>
<Style TargetType="{x:Type TextBox}">
<Setter Property="BorderBrush" Value="Red"></Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="BorderBrush" Value="Bisque"></Setter>
</Trigger>
</Style.Triggers>
</Style>
</TextBox.Style>
</TextBox>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|