WPF TabItem.Collapse 的问题


WPF TabItem.Collapse 的问题

运行环境:Window7 64bit,.NetFramework4.61,C# 6.0; 编者:乌龙哈里 2017-02-16

感谢 LICEcap 的作者,弄了个很小巧好用的桌面录制gif软件。


我用了一个 WPF 的 TabControl 的控件,下面弄了两个 TabItem,设想是点击一个按钮后,出现一个,隐藏另外一个,结果发现 TabItem 里面的内容 没有显示。上例子:

xaml:

        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d"
        Title="MainWindow" Height="200" Width="200" >
    
        
            
            
        

        
            

WPF