deSantoz

Tabcontrol WPF

Oct 25th, 2020
905
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <TabControl Grid.Row="1" TabStripPlacement="Left" BorderThickness="0">
  2.             <TabControl.Resources>
  3.                 <Style TargetType="TabItem">
  4.                     <Setter Property="Template">
  5.                         <Setter.Value>
  6.                             <ControlTemplate TargetType="TabItem">
  7.                                 <Grid Name="Panel">
  8.                                     <ContentPresenter x:Name="ContentSite" ContentSource="Header" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5"></ContentPresenter>
  9.                                 </Grid>
  10.                                 <ControlTemplate.Triggers>
  11.                                     <Trigger Property="IsSelected" Value="True">
  12.                                         <Setter TargetName="Panel" Property="Background" Value="#337BAE"></Setter>    
  13.                                     </Trigger>
  14.                                     <Trigger Property="IsSelected" Value="False">
  15.                                         <Setter TargetName="Panel" Property="Background" Value="transparent"></Setter>
  16.                                     </Trigger>
  17.                                     <Trigger Property="IsMouseOver"  Value="True">
  18.                                         <Setter TargetName="Panel" Property="Background" Value="#D5D6D2"></Setter>
  19.                                     </Trigger>
  20.                                 </ControlTemplate.Triggers>
  21.                             </ControlTemplate>
  22.                         </Setter.Value>
  23.                     </Setter>
  24.                 </Style>
  25.             </TabControl.Resources>
  26.             <TabItem Name="TabHome" Width="100" Height="60">
  27.                 <TabItem.Header>
  28.                     <StackPanel Orientation="Horizontal" Width="auto">
  29.                         <Image Source="E:\Untuk Aplikasi\go_black.png" Width="24" Height="24" Margin="0,0,10,0" RenderOptions.BitmapScalingMode="HighQuality"></Image>
  30.                         <TextBlock Text="Home" VerticalAlignment="Center" HorizontalAlignment="Left"/>
  31.                     </StackPanel>
  32.                 </TabItem.Header>
  33.                 <TabItem.Content>Selamat Datang</TabItem.Content>
  34.             </TabItem>
  35. </TabControl>
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×