Home | Screenshots | Download | Order | Blog* | Support |
User Guide | Style | Tab Grouping | Add-ins | FAQ |
You can create different tab coloring rules to set distinct background and foreground for different groups of tabs. If the tab matches several rules, only the last rule in the list is applied to it. You can drag rules to change their order.
The IsDocument property is true for regular code files and false for tabs like Start Page, Class View, Object Browser etc.
Regular expression options apply Regex.IsMatch to the corresponding tab property (e.g. TabName) when the regex is not empty (see Regular Expression Language Elements MSDN page for .NET regular expressions details). When the regex is empty the rule applies to all tabs.Tab name regex is matched with the TabName property. For example, the "Form2 .cs .cs [Design]" tab has the tab name "Form2". A single tab like "Class1.cs" has the name "Class1".
Tab extensions regex is matched with the TabExtensions property. TabExtensions consists of the extensions separated by '$'. For example, the "Form2 .cs .cs [Design]" tab has tab extensions ".cs$.cs [Design]$". A single tab like "Class1.cs" has tab extensions ".cs$". If you want to set a special color for form designer tabs, set Tab extensions regex to \[Design\].
Project name regex is matched with the ProjectName property.
Document paths regex is matched with the Paths property. Paths consists of document paths separated by '$'. For example, the tab "App .xaml .xaml.cs" has paths "c:\Projects\WpfApplication1\app.xaml$c:\Projects\WpfApplication1\app.xaml.cs$". If you want to set a color for all xaml and xaml.cs tabs, Document paths regex could be \.(xaml|xaml\.cs)\$.
Custom conditions let you switch on tab properties not listed in this dialog. For example, the MVCGroup add-in adds IsController and IsView attached tab properties. To color controller tabs you can use the following custom condition:
<Condition Binding="{Binding Path=(TabsStudioMvcGroup:Properties.IsController), RelativeSource={RelativeSource Self}}" Value="True"/>
If you have many similar tab coloring rules, you can generate them programmatically.
See more style examples.
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:TabsStudio="clr-namespace:TabsStudio;assembly=TabsStudio" [ADDINS_HEADERS]> [DEFAULT_STYLES] [ADDINS_STYLES + PRESENTATION_STYLES] [CUSTOM_STYLES] </ResourceDictionary>
ADDINS_HEADERS - collection of strings that each add-in can add using the GetNamespacesForResourceDictionary function.
DEFAULT_STYLES - default styles for VS 2010, default styles for VS 2012/2013, default styles for VS 2015/2017/2019, default styles for VS 2022.ADDINS_STYLES - collection of styles that each add-in can add using the UpdatePresentationStyles function.
PRESENTATION_STYLES - generated depending on Presentation options selected.CUSTOM_STYLES - contents of the Style page.
This way add-ins/presentation can override default styles and custom styles can override them all.TabsHost : ContentControl | - TabsItemsControl : ItemsControl | - Tabs : Panel (IsGroupSelected, IsGroupFocused, IsGroupWithLastActiveDocument for VS 2010, | LessRowsPriority, ShortTabsPriority, ShortTabs, RowBuffer, TabsAnimationDuration, SuperGroupMargin) | - Tab : TabItem (IsTabSelected, IsPreviouslySelectedTab, IsDocument, IsPreviewTab for VS 2012, | IsMultiExtensions, Paths, TabName, TabExtensions, ProjectName, | SuperGroupIsFirstTab, SuperGroupIsLastTab, SuperGroupName) | - TabToolTip : ToolTip | - TabInternals : DockPanel | - TabNameGroup : StackPanel (IsNameReadOnly, IsNameModified, IsNameExecuting, IsNameDebugging) | | | - TabName : Label | | | - TabNameModificationMarker : Label | | | - TabNameReadOnlyImage : Image | | | - TabNameExecutingDebuggingImage : Image | - TabExtensionGroup : StackPanel (IsExtensionActive, IsExtensionReadOnly, IsExtensionModified, | | IsExtensionExecuting, IsExtensionDebugging) | | | - TabExtension : Label | | | | | - TabExtensionToolTip : ToolTip | | | - TabExtensionModificationMarker : Label | | | - TabExtensionReadOnlyImage : Image | | | - TabExtensionExecutingDebuggingImage : Image | | | - TabExtensionCloseButton: Button | - OpenPreviewTabButton : Button | - CloseTabButton : Button
IsDocument property is false for Start Page, Class View, Object Browser etc.
IsMultiExtensions property is true when the tab is a group of two or more extensions.
Paths consists of document paths separated by '$'. For example, the tab "App .xaml .xaml.cs" has paths "c:\Projects\WpfApplication1\app.xaml$c:\Projects\WpfApplication1\app.xaml.cs$".
TabName is "Form2" for the "Form2 .cs .cs [Design]" tab. A single tab like "Class1.cs" has the name "Class1".
TabExtensions consists of the extensions separated by '$'. For example, the "Form2 .cs .cs [Design]" tab has tab extensions ".cs$.cs [Design]$". A single tab like "Class1.cs" has tab extensions ".cs$".
TabsAnimationDuration controls tab movement animation duration. Default value when you check the Animate tab movement option is "0:0:0.3".
Copyright 2009 - 2024 Vlasov Studio (Visual Studio extensions and tools)