MDI在WPF中使用选项卡控件 [英] MDI Using Tab Control in WPF

查看:229
本文介绍了MDI在WPF中使用选项卡控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在考虑在WPF中开发MDI ...
谷歌搜索后,我知道可以通过WPF中带有用户控件库的Tab Control来实现...

现在我的问题是在UserControl中创建窗口之后,然后使用XAML代码调用用户控件...

当主窗口运行时,WPF会加载所有选项卡及其内容...

或当我单击ta时,其内容将从dll加载...

因为我希望通过使用单独的dll作为用户控制组Windows来使我的应用程序大小变小....

现在又有一个问题,谁知道WPF和选项卡控件

I am thinking of developing a MDI in WPF...
After googling i came to know that it can be achieved through Tab Control with User Control Library in WPF...

Now my question is After Creating My Window in a UserControl and then using XAML code to call the user control...

When the Main Window runs do WPF loads all the tab and its content...

Or as i click on a ta its content loads at that time from the dll...

Because i want my application size to be small by using seperate dll for groups of windows as usercontrol....

Now one more question who knows WPF and tab control

<tabcontrol margin="10,10,10,10" name="tabMain" tabstripplacement="Left">
    <tabcontrol.resources>
         <Style TargetType="{x:Type TabItem}">
             <setter property="Height" value="30" />
             <setter property="Width" value="100" />
         </Style>
     </tabcontrol.resources>
     <tabitem header="Create" name="tiCreate">
         <grid></grid>
     </tabitem>
     <tabitem header="Vouchers" name="tiVouchers">
         <grid />
     </tabitem>
     <tabitem header="Display" name="tiDisplay">
         <grid />
     </tabitem>
     <tabitem header="Reports" name="tiReports">
         <grid />
     </tabitem>
 </tabcontrol>



如果您看到此信息,我已使用资源并在左侧对齐了Tabstrip,并将deault宽度设置为100,现在我想将选定的Tabheader宽度更改为120,将Unselected的Tabheader宽度更改为默认值100.
可能是我需要使用触发器,但不确定如何使用该触发器.



If u see this i have used resource and aligned the tabstrip in left and setted the deault width as 100 and now i want to change the selected tabheader width to 120 and unselected tabheader width as 100 as default.. how can i use that..
May be i need to use triggers but not sure how to use that

推荐答案

请对此进行查看.这非常方便.

WPF中的页眉可编辑标签控件 [
Please have a look on that. This is very handy.

Header Editable Tab Control in WPF[^]


这篇关于MDI在WPF中使用选项卡控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆