开发者

Prevent tab into WPF DataGrid

开发者 https://www.devze.com 2022-12-31 19:50 出处:网络
I would like to prevent tabbing into a read-only Microsoft data grid in WPF. I set IsTabStop to False, but I can still tab i开发者_StackOverflownto the data grid.

I would like to prevent tabbing into a read-only Microsoft data grid in WPF. I set IsTabStop to False, but I can still tab i开发者_StackOverflownto the data grid. Any ideas?

<WpfToolkit:DataGrid
    IsReadOnly="True"
    IsTabStop="False"
    ItemsSource="{Binding Path=GridData, Mode=OneWay}" >
</WpfToolkit:DataGrid>


It helps, if you add this line to your datagrid xaml:

KeyboardNavigation.TabNavigation="None"

0

精彩评论

暂无评论...
验证码 换一张
取 消