Monday, July 11, 2011

WPF- How to Put WPF tab Control on left hand side with Tab Header rotated to 270

Following sample will show how we can put tab control on left hand side with tab header rotated to 270

<TabControl TabStripPlacement="Left">

<TabControl.Resources>

<Style TargetType="{x:Type TabItem}">

<Setter Property="Padding" Value="8" />

<Setter Property="HeaderTemplate">

<Setter.Value>

<DataTemplate>

<ContentPresenter Content="{TemplateBinding Content}">

<ContentPresenter.LayoutTransform>

<RotateTransform Angle="270" />

</ContentPresenter.LayoutTransform>

</ContentPresenter>

</DataTemplate>

</Setter.Value>

</Setter>

</Style>

</TabControl.Resources>

<TabItem Header="My Tab Item 1" />

<TabItem Header="My Tab Item 2" />

<TabItem Header="My Tab Item 3" />

<TabItem Header="My Tab Item 4" />

</TabControl>

No comments:

Post a Comment

If you’re using Visual Studio to build your .NET MAUI app on a Mac, locating the IPA (iOS App Package) file can be a bit tricky

  If you’re using   Visual Studio   to build your   .NET MAUI   app on a   Mac , locating the   IPA (iOS App Package)   file can be a bit tr...