1
我需要我的GridView的条目被集中和复制,所以我做了一个TextBox单元模板:XAML的GridView项可复制(文本框的ItemTemplate中) - IsSelected不工作了
<GridViewColumn Header="Kat." Width="40">
<GridViewColumn.CellTemplate>
<DataTemplate>
<!-- Text to copy -->
<TextBox Text="{Binding Category, Mode=OneWay}"/>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
问题是:这位用户可以单击文本框并复制它们的内容,但只有当用户单击列之间的非常小的间隙时,才能更改所选行。在TextBox中单击时,所选行(IsSelected)不会更改。
有没有人遇到同样的问题,并找到了解决方案?
(我敢打赌,有某种“......是不一样的视觉树” -xaml默认-问题,但这个解释仅此一项就帮不了我。))