C1TabControl, Left side placement, Horizontal text

Posted by: mike on 17 April 2021, 3:34 pm EST

  • Posted 17 April 2021, 3:34 pm EST

    Hi. I have looked and looked and don't see how to place tab items on the left or right side with horizontal text. Standard WTF tab controls have this capability; does C1TabControl?

    Secondly, when a the "New" tab is pressed, which event is fired?

    Thirdly, for the initial tab and subsequent new tabs, how may I specify a standard form to display?

    Thanks
  • Marked as Answer

    Replied 18 April 2021, 5:29 pm EST

    Hi Mike,

    > I have looked and looked and don't see how to place tab items on the left or right side with horizontal text

    C1TabControl displays the tab items text vertically by default when they are docked to left/right. However, You can display text horizontally by applying a LayoutTransform to the C1TabItems as follows:
    <Window.Resources>
    <local:RotateConverter x:Key="RotateConverter"></local:RotateConverter>
    <Style TargetType="c1:C1TabItem">
    <Setter Property="LayoutTransform">
    <Setter.Value>
    <RotateTransform Angle="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=c1:C1TabControl}, Converter= {StaticResource RotateConverter}}"></RotateTransform>
    </Setter.Value>
    </Setter>
    </Style>
    </Window.Resources>


    > Secondly, when a the "New" tab is pressed, which event is fired?

    C1TabControl's SelectionChanged event is fired Whenever a new tab is selected/pressed.

    > Thirdly, for the initial tab and subsequent new tabs, how may I specify a standard form to display?

    You can set the C1TabItem's Content property in order to display a form as follows:
    <c1:C1TabItem Header="Tab 1">
    <c1:C1TabItem.Content>
    // Put Form here
    </c1:C1TabItem.Content>
    </c1:C1TabItem>

    Please refer to the same from the attached sample. (see TabControlSample.zip)

    Best Regards,
    Kartik

    TabControlSample.zip
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels