如何将TabControl绑定到多个用户控件 [英] How to bind a TabControl to several User Controls
本文介绍了如何将TabControl绑定到多个用户控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我想将TabControl绑定到用户控件,以便在TabItem中拥有每个用户控件。
这可能,知道TabControl本身在UserControl中吗?
谢谢
Hello all,
I would like to bind a TabControl to User Controls in order to have each User Control in a TabItem.
Is this possible, knowing the TabControl is itself in a UserControl ?
Thanks
推荐答案
您可以将usercontrol添加为tabItem本身,例如
You can add the usercontrol as a tabItem itself like
<tabitem header="My TabItem1">
<local:tabusercontrol1 xmlns:local="#unknown" />
</tabitem>
<tabitem header="My TabItem2">
<local:tabusercontrol2 xmlns:local="#unknown" />
</tabitem>
或向tabcontrol添加多个datatemplate ...
查看此
http://stackoverflow.com/questions/9796174/load-usercontrol-in-tabitem [ ^ ]
这篇关于如何将TabControl绑定到多个用户控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文