选项卡控件
TabItem 里面 只能有一个控件
我们可以放置一个布局控件 然后再在布局控件里面添加其他的子控件
<Grid>
<TabControl x:Name="tabControl">
<TabItem Header="详情">
<StackPanel>
<Button>dd</Button>
<Button>dd</Button>
<Button>dd</Button>
<Button>dd</Button>
</StackPanel>
</TabItem>
<TabItem Header="评论" Margin="0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<Rectangle Grid.Row="0"></Rectangle>
<Rectangle Fill="Blue" Grid.Row="1"></Rectangle>
</Grid>
</TabItem>
</TabControl>
</Grid>Code language: HTML, XML (xml)
Previous: 13-小练习-鼠标移动显示鼠标的位置
Next: 15-分组框控件的使用GroupBox