Hide Tab headers in WPF TabControl
问题 What is the best way to hide Tab headers when there is only a single visible Tab? I want to hide TabControl chrome completely, while leaving the content of the Tab visible. 回答1: You can use a Style applied to TabItem with a DataTrigger that will collapse it if the parent TabControl has only one item: <Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Grid.Resources>