Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - trouble with tab control header info

 
 
Old 02-27-2006   #1 (permalink)
CNH


 
 

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
 

Thread Tools


Similar Threads
Thread Forum
Windows Live Mail Desktop... problems with encoding/header info imbedded into emails sent between hotmail accounts Live Mail
Problem with encoding/header info imbedded into emails between hotmail.com accounts using Live Mail Desktop client Live Mail
Allow user to modify header info of a received fax Vista print fax & scan
Outgoing mail - no header info indicated on print copy Vista mail


Vista Forums 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 Ltd

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