Reputation: 71
<TextBox Foreground="Black"
FontFamily="Times New Roman"
FontWeight="Bold"
FontSize="15"
MaxHeight="50"
Margin="6,95,40.067,0"
Name="txt1" VerticalAlignment="Top"
IsHitTestVisible="False"
Height="30"
Grid.Row="4"
Grid.Column="2"/>
What is the role of IsHitTestVisible property on TextBox?
Upvotes: 7
Views: 9293
Reputation: 1826
When you have a control inside another control, like, If you have a TextBox inside... lets say, another TextBox. Then by setting the isHitTestvisible
property of the parent control to False you allow the user to type in the child TextBox. If you set it to True then the RoutedEvent will be handled at the parent control level.
This property is mostly used when you work with Adorners
.
Upvotes: 13
Reputation: 17134
true if this element could be returned as a hit test result from at least one point; otherwise, false. The default value is true.
Source: MSDN
See also: Hit Testing in the Visual Layer
Upvotes: 0
Reputation: 77866
Check this posts
http://social.msdn.microsoft.com/Forums/en/wpf/thread/7c352827-b4ed-493c-8a68-58179ad801fc
http://msdn.microsoft.com/en-us/library/system.windows.uielement.ishittestvisible.aspx
Upvotes: 0