本文介绍了如何从UserControl事件更改WPF TabControl的TabItem?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
在我的项目中,即在WPF中,TabControl有4个选项卡。在第4个选项卡上有一个包含DataGrid的UserControl。我想导航tha TabItem 1,即TabIndex 0,当点击DataGrid的行时
之前我的DataGrid直接托管在TabItem 4上而不是UserControl,我可以根据 []但当我把DataGrid放在UserControl上时无法导航。
请帮帮我...
Hi
In my project i.e in WPF there is TabControl with 4 tab. On the 4th Tab a UserControl that hold a DataGrid. I want to navigate the tha TabItem 1 i.e TabIndex 0 when click on the Row of DataGrid
Before above when my DataGrid is directly hosted on the TabItem 4 not a UserControl, I am able to navigate the TabItem 1 according to This[^] but when I put the DataGrid on the UserControl the not able to navigate.
Please help me...
推荐答案
这篇关于如何从UserControl事件更改WPF TabControl的TabItem?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!