Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Textbox tag and IsHitTestVisible property

Tags:

c#

wpf

xaml

<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?

like image 854
Prabhee Avatar asked Mar 05 '12 09:03

Prabhee


Video Answer


1 Answers

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.

like image 117
gaurawerma Avatar answered Sep 18 '22 20:09

gaurawerma