RadTabControl without Content Area

5 posts, 0 answers
  1. Jozef Prídavok
    Jozef Prídavok avatar
    3 posts
    Member since:
    Oct 2009

    Posted 26 Nov 2009 Link to this post

    Hello,

    i would like to have RadTabControl with empty TabItem. I tried to set empty border but there is still 2pixel weight horizontal lines - see attached image. Here is my style:

            <Style x:Key="RoundPanel-View" TargetType="tlrNavigation:RadTabControl">
                <Setter Property="VerticalAlignment" Value="Bottom" />
                <Setter Property="DropDownDisplayMode" Value="Visible" />
                <Setter Property="ScrollMode" Value="Viewport" />
                <Setter Property="BackgroundVisibility" Value="Collapsed" />
                <Setter Property="BorderThickness" Value="0" />
                <Setter Property="BorderBrush" Value="Transparent" />
            </Style>

    TabItem i created programmaticaly without any content:

                RadTabItem ti = new RadTabItem() {
                    Padding = new Thickness(4, 1, 4, 1),
                    DropDownContent = view.ToString(),
                    Header = new TextBlock() {
                        Text = view.ToString(),
                        Margin = new Thickness(19, 2, 19, 0)
                    },
                    BorderThickness = new Thickness(0),
                    Tag = view
                };
                views.Items.Add(ti);

    Is it possible to have totally collapsed Content Are? Thanks for any advices.

    Jozef
  2. Jozef Prídavok
    Jozef Prídavok avatar
    3 posts
    Member since:
    Oct 2009

    Posted 01 Dec 2009 Link to this post

    No advices?
  3. DevCraft banner
  4. Dimitrina
    Admin
    Dimitrina avatar
    442 posts

    Posted 01 Dec 2009 Link to this post

    Hello Jozef ,

    Please find attached an example.

    If you have further more questions please do not hesitate to ask us
    I hope this will help you.

    Sincerely yours,
    Dimitrina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Jozef Prídavok
    Jozef Prídavok avatar
    3 posts
    Member since:
    Oct 2009

    Posted 01 Dec 2009 Link to this post

    Thank you very much!

    I used trick with Margin-Bottom=-2 in general style (not directly to "Content Area" control). So new style looks like:

            <Style x:Key="RoundPanel-View" TargetType="tlrNavigation:RadTabControl">
                <Setter Property="VerticalAlignment" Value="Bottom" />
                <Setter Property="DropDownDisplayMode" Value="Visible" />
                <Setter Property="ScrollMode" Value="Viewport" />
                <Setter Property="BackgroundVisibility" Value="Collapsed" />
                <Setter Property="BorderThickness" Value="0" />
                <Setter Property="BorderBrush" Value="Transparent" />
                <Setter Property="Background" Value="Transparent" />
                <Setter Property="Margin" Value="0,0,0,-2" />
            </Style>

    Thank You again, You inspireted me! It will be fine to have new attribute (e.g. ContentAreaVisibility="Collapsed") - it would be perfect solution.

    Regards

    Jozef


  6. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 04 Dec 2009 Link to this post

    Hello Jozef,

    Thank you for the suggestion. We would definitely take it into consideration for the future versions of RadTabControl.

    Regards,
    Kiril Stanoev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top
DevCraft banner