Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Row in GridView (of a ListView) won't select when a GridViewColumn that has been templated out is clicked

$
0
0

I have a ListView with GridViewColumns. One of the GridViewColumns is templated out (CellTemplate = ...). I placed a simple TextBox there (via a DataTemplate). However, if I click on the TextBox, the row won't select unless I click in the tiny margin around the TextBox or on a GridViewColumn that has not been templated. How can I fix this?

<DataTemplate x:Key="EventDescriptionWrapTextTemplate"><Grid Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"><TextBox HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="2" Text="{Binding EventDescription}" TextWrapping="Wrap" IsReadOnly="True" BorderThickness="0" /></Grid></DataTemplate><ListView x:Name="listView" Grid.Row="1" Margin="8,0" ItemsSource="{Binding TimeLine}"><ListView.View><GridView><GridViewColumn Header="Problem" Width="150" CellTemplate="{Binding Source={StaticResource EventDescriptionWrapTextTemplate} }" />



Michael



Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>