Non-rectangular tabs?

5 posts, 1 answers
  1. SteveL
    SteveL avatar
    68 posts
    Member since:
    Apr 2009

    Posted 04 Jul 2009 Link to this post

    is it possible to have non-rectangular tabs, which also overlap, like the ones in VS2008?

    Steve
  2. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 06 Jul 2009 Link to this post

    Hello Steve,

    Please have a look at this thread. It is for Silverlight, but it can easily be reused for WPF.
    Let me know how it works for you.

    Best wishes,
    Kiril Stanoev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for WPF is Visual Studio 2017 Ready
  4. SteveL
    SteveL avatar
    68 posts
    Member since:
    Apr 2009

    Posted 06 Jul 2009 Link to this post

    Thanks - I've created a WPF project equivalent to the Silverlight example project that was posted in that thread. It works to a certain extent, the tabs get the correct shape, but the selected tab doesn't change colour like in the Silverlight case, and the 'MouseOver' doesn't have any effect either. To get VisualStateManager for WPF, I'm using the June 2009 release of the WPF Toolkit.

    I'm quite new to WPF, so the required change is probably quite obvious to someone more experienced! is it something to do with the WPF VSM?

    Steve
  5. Answer
    Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 07 Jul 2009 Link to this post

    Hello Steve,

    What you could do in this case is to replace the VisualStates with Triggers.
    I have attached a sample project demonstrating that functionality.
    Have a look at it and let me know how it works for you.

    Kind regards,
    Kiril Stanoev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. SteveL
    SteveL avatar
    68 posts
    Member since:
    Apr 2009

    Posted 07 Jul 2009 Link to this post

    Thank you very much, Kiril, that works great! I made one change, to stop the mouseover effect on the currently selected tab, I changed it to a MultiTrigger:

    <MultiTrigger> 
        <MultiTrigger.Conditions> 
            <Condition Property="IsMouseOver" Value="True" /> 
            <Condition Property="IsSelected" Value="False" /> 
        </MultiTrigger.Conditions> 
        <Setter TargetName="OuterPath" Value="{StaticResource TabItemMouseOverInnerBorder}" Property="Stroke"/> 
        <Setter TargetName="OuterFill" Value="{StaticResource TabItemMouseOverInnerBorder}" Property="Stroke"/> 
        <Setter TargetName="InnerFill" Value="{StaticResource TabItemMouseOverBackground}" Property="Background"/> 
        <Setter TargetName="InnerPath" Value="{StaticResource TabItemMouseOverBackground}" Property="Fill"/> 
    </MultiTrigger> 

    Steve


Back to Top
UI for WPF is Visual Studio 2017 Ready