This is a migrated thread and some comments may be shown as answers.

Non-rectangular tabs?

4 Answers 81 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
SteveL
Top achievements
Rank 2
SteveL asked on 04 Jul 2009, 06:45 PM
is it possible to have non-rectangular tabs, which also overlap, like the ones in VS2008?

Steve

4 Answers, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 06 Jul 2009, 08:18 AM
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.
0
SteveL
Top achievements
Rank 2
answered on 06 Jul 2009, 10:47 AM
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
0
Accepted
Kiril Stanoev
Telerik team
answered on 07 Jul 2009, 07:12 AM
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.
0
SteveL
Top achievements
Rank 2
answered on 07 Jul 2009, 11:39 AM
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


Tags
TabControl
Asked by
SteveL
Top achievements
Rank 2
Answers by
Kiril Stanoev
Telerik team
SteveL
Top achievements
Rank 2
Share this question
or