Windows Vista Forums
Vista Forums Home Join Vista Forums Webcasts Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

trouble with tab control header info

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 02-27-2006   #1 (permalink)
CNH
Guest


 

trouble with tab control header info

when applying a control template to a tab item I'm struggling to access the
tab item header content vs the tab item content. I finally figured out to
set the controlpresenter source="Header" to get the content to come thru.
I'm now trying to change the font attributes of the header content when the
tab is selected. The fontsize setter in the trigger below changes all font
sizes not just the header. Thanks

<Style x:Key="styleRoundTab" TargetType="{x:Type TabItem}">
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
<LinearGradientBrush.RelativeTransform>
<TransformGroup>
<TranslateTransform X="-0.5" Y="-0.5"/>
<ScaleTransform ScaleX="1" ScaleY="1"/>
<SkewTransform AngleX="0" AngleY="0"/>
<RotateTransform Angle="270"/>
<TranslateTransform X="0.5" Y="0.5"/>
<TranslateTransform X="0" Y="0"/>
</TransformGroup>
</LinearGradientBrush.RelativeTransform>
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Color="sc#1, 0.10, 0.14, 0.08" Offset="1"/>
<GradientStop Color="sc#1, 0.0002002716, 0, 1" Offset="0"/>
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="Foreground" Value="White" />
<Setter Property = "FontWeight" Value="Regular"/>
<Setter Property="Width" Value="150" />
<Setter Property="Height" Value="50" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabItem}">
<Grid Height="{TemplateBinding Height}">
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<Rectangle Grid.Column="0" Width="140" RadiusX="33" RadiusY="13"
Margin="0,0,0,0" Fill="{TemplateBinding Background}">
</Rectangle>
<Rectangle Grid.Column="1" Grid.ColumnSpan="2" Width="100"
HorizontalAlignment="Center" Margin="0,0,0,0" Fill="{TemplateBinding
Background}">
</Rectangle>
<ContentPresenter Grid.ColumnSpan="2" Grid.Column="0"
Margin="13,2,13,4" ContentSource="Header" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsSelected" Value="true">
<Setter Property = "Height" Value="55"/>
<Setter Property = "FontSize" Value="15"/>
</Trigger>
</Style.Triggers>
</Style>

My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Live Mail Desktop... problems with encoding/header info imbedded into emails sent between hotmail accounts Grant - CNW Live Mail 6 05-28-2008 03:15 PM
Problem with encoding/header info imbedded into emails between hotmail.com accounts using Live Mail Desktop client Grant - CNW Live Mail 1 02-24-2008 01:38 AM
Allow user to modify header info of a received fax Blue Max Vista print fax & scan 9 06-11-2007 06:08 PM
Outgoing mail - no header info indicated on print copy JIM D Vista mail 2 04-19-2007 05:22 PM
Tab control with vertical header text Mike Partain Avalon 2 03-23-2007 11:11 PM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51