I have a grid that contains 3 rows, one of which contains a TextBox thats can be edited. The grid sits inside a paretn that provides drag functionality to enable it to moved around a canvas. In order to enable this, i need to set IsHitTestVisible to false, in order to allow the mouse click to passed through to the parent object.
The problem is, when i do this, i cant select the textbox in the grid, even if the hit test visible is set to True;
<Grid Background="{StaticResource NodeBackground}" IsHitTestVisible="True">
<Grid.RowDefinitions>
<RowDefinition Height="2*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<TextBox Text="{Binding Data}" Foreground="White" Background="Transparent" FontFamily="Consolas" FontSize="15" TextAlignment="Center" Grid.Row="1" BorderThickness="0" />
</Grid>
Is it possible to set the hit test property on a per-row basis, so if either of the two empty rows were hit, they would continue to pass the click onto the parent container, but still be able to select the textbox in the middle row?
Cheers.