用主窗口展开tabcontrol [英] Expand the tabcontrol with main window

查看:78
本文介绍了用主窗口展开tabcontrol的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


当它最大化时,我需要用主窗口扩展tabcontrol.

帮助我在主窗口中调整TabControl的大小.我尝试了如下方法...


 <   Window     x:Class   ="  
 
                     span>    xmlns   ="  http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
                     span>    xmlns:x   ="  http://schemas.microsoft.com/winfx/2006/xaml" 
                     span>   标题  ="  MainWindow" 高度   350"  Width   ="  >> 

<  网格   <   TabControl     ="   310" 名称   tabControl1"   宽度  ="  501"  VerticalAlignment   拉伸"  Horizo​​ntalAlignment   ="    > 
<  /TabControl  > 
    <  /Grid  > 
<  /Window  >  




.....................?

解决方案

要允许您的标签控件随窗口调整大小,删除选项卡控件的宽度和高度的显式设置.


hi
i need to expand the tabcontrol with main window,when it maximize.

help me to resize the tabcontrol with the main window. i tried something as follows...


<Window x:Class="WpfApplication1.MainWindow"

        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

        Title="MainWindow" Height="350" Width="525">

<Grid >      
        <TabControl Height="310" Name="tabControl1" Width="501" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
</TabControl>            
    </Grid>   
</Window>




.....................?

解决方案

To allow your tab control to resize with the window, remove the explicit setting of the width and height for the tab control.


这篇关于用主窗口展开tabcontrol的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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