Tabs Studio Blog (organizing Visual Studio document tabs)

April 30, 2009

Dynamic style

Filed under: Uncategorized — Tags: — Sergey Vlasov @ 5:38 am

I’ve updated styling code to allow more customization. To change global tabs font family and font size you should now use the following format:

Style resources settings

Style resources settings

The result is the same as in the previous post:

Default tabs style

Default tabs style


Custom tabs style

Custom tabs style

More customization means that now you can, for example, set Italic font style only for the selected tab name:

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:TabsStudio="clr-namespace:TabsStudio;assembly=TabsStudio">
<Style TargetType="TabsStudio:TabNameLabel">
    <Style.Triggers>
        <Trigger Property="IsTabSelected" Value="True">
            <Setter Property="Control.FontStyle" Value="Italic"/>
        </Trigger>
    </Style.Triggers>
</Style>
</ResourceDictionary>

The result is:

Custom selected tab name

Custom selected tab name

Notice how the not selected tab name and extensions on the selected tab stay in the normal font style.

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

Please log in to WordPress.com to post a comment to your blog.

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Theme: Shocking Blue Green. Blog at WordPress.com.