You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.8 KiB

2 years ago
<Window x:Class="TabControlSample.MainWindow"
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"
xmlns:local="clr-namespace:TabControlSample"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="400">
<Grid Margin="10">
<TabControl>
<TabItem>
<TabItem.Header>
<StackPanel Orientation="Horizontal">
<Image Source="https://cdn4.iconfinder.com/data/icons/logos-and-brands/512/216_Microsoft_logo_logos-512.png" Width="10" Margin="0,0,5,0"/>
<TextBlock Text="Item1"/>
</StackPanel>
</TabItem.Header>
<StackPanel>
<Label Content="Item1 #1"/>
<Label Content="Item1 #2"/>
<Label Content="Item1 #3"/>
<Label Content="Item1 #4"/>
</StackPanel>
</TabItem>
<TabItem Header="Item2">
<StackPanel>
<Label Content="Item2 #1"/>
<Label Content="Item2 #2"/>
<Label Content="Item2 #3"/>
<Label Content="Item2 #4"/>
</StackPanel>
</TabItem>
<TabItem Header="Item3">
<StackPanel>
<Label Content="Item3 #1"/>
<Label Content="Item3 #2"/>
<Label Content="Item3 #3"/>
<Label Content="Item3 #4"/>
</StackPanel>
</TabItem>
</TabControl>
</Grid>
</Window>