Tabs Studio Blog (organizing Visual Studio document tabs)

December 16, 2011

Dark theme for Visual Studio 2010

Filed under: Uncategorized — Tags: , — Sergey Vlasov @ 12:32 pm

If you like the original Visual Studio 2010 tabs theme you can use the excellent Visual Studio 2010 style for Tabs Studio by Jameel Al-Aziz. But, as this style changes many aspects of tabs presentation, it also overrides custom colors that you assign with tab coloring rules in Tabs Studio presentation options. (Of course, you can implement all coloring rules as style rules, it just requires working directly with XAML). Below is a simple style that closer to the overall Visual Studio 2010 theme and still supports additional tab coloring rules.

The following style changes tab text color from default black to white for not selected and not highlighted tabs:

<Style TargetType="TabsStudio:TabName" BasedOn="{StaticResource DefaultTabNameStyle}">
  <Style.Triggers>
  <MultiDataTrigger>
            <MultiDataTrigger.Conditions>
                <Condition Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource AncestorType=TabsStudio:Tab}}" Value="False"/>
                <Condition Binding="{Binding Path=IsTabSelected, RelativeSource={RelativeSource AncestorType=TabsStudio:Tab}}" Value="False"/>
            </MultiDataTrigger.Conditions>
            <Setter Property="Foreground" Value="White"/>
      </MultiDataTrigger>
  </Style.Triggers>
</Style>

<Style TargetType="TabsStudio:TabExtension" BasedOn="{StaticResource DefaultTabExtensionStyle}">
  <Style.Triggers>
  <MultiDataTrigger>
            <MultiDataTrigger.Conditions>
                <Condition Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource AncestorType=TabsStudio:Tab}}" Value="False"/>
                <Condition Binding="{Binding Path=IsTabSelected, RelativeSource={RelativeSource AncestorType=TabsStudio:Tab}}" Value="False"/>
            </MultiDataTrigger.Conditions>
            <Setter Property="Foreground" Value="White"/>
      </MultiDataTrigger>
  </Style.Triggers>
</Style>

<Style TargetType="TabsStudio:TabNameModificationMarker" BasedOn="{StaticResource DefaultTabNameModificationMarkerStyle}">
  <Style.Triggers>
  <MultiDataTrigger>
            <MultiDataTrigger.Conditions>
                <Condition Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource AncestorType=TabsStudio:Tab}}" Value="False"/>
                <Condition Binding="{Binding Path=IsTabSelected, RelativeSource={RelativeSource AncestorType=TabsStudio:Tab}}" Value="False"/>
            </MultiDataTrigger.Conditions>
            <Setter Property="Foreground" Value="White"/>
      </MultiDataTrigger>
  </Style.Triggers>
</Style>

<Style TargetType="TabsStudio:TabExtensionModificationMarker" BasedOn="{StaticResource DefaultTabExtensionModificationMarkerStyle}">
  <Style.Triggers>
  <MultiDataTrigger>
            <MultiDataTrigger.Conditions>
                <Condition Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource AncestorType=TabsStudio:Tab}}" Value="False"/>
                <Condition Binding="{Binding Path=IsTabSelected, RelativeSource={RelativeSource AncestorType=TabsStudio:Tab}}" Value="False"/>
            </MultiDataTrigger.Conditions>
            <Setter Property="Foreground" Value="White"/>
      </MultiDataTrigger>
  </Style.Triggers>
</Style>

Plus you need to create a tab coloring rule for not selected tabs with transparent background:

<SolidColorBrush Color="Transparent"/>

Transparent background for not selected tabs

Transparent background for not selected tabs


It is very important that this rule be the first one in your tab coloring rules so that additional tab coloring rules could override it with custom colors. Below is the new tabs look:
Dark tabs theme in Visual Studio 2010

Dark tabs theme in Visual Studio 2010


Now you can for example set a specific color for a project with Tab coloring rules. As tab text is white, you need to use dark colors for background or use normal colors with transparency (to set transparency level, use the Opacity slider in the Color Picker dialog):
Project tab coloring rule with transparency

Project tab coloring rule with transparency


Dark theme with custom transparent colors for two projects

Dark theme with custom transparent colors for two projects


Additionally you can set selected but unfocused tab background to gray as in the original Visual Studio 2010 theme:

<Condition Binding="{Binding Path=IsGroupFocused, RelativeSource={RelativeSource Self}}" Value="False"/>
<Condition Binding="{Binding Path=IsGroupWithLastActiveDocument, RelativeSource={RelativeSource Self}}" Value="True"/>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
  <GradientStop Color="#FFFDFDFD" Offset="0"/>
  <GradientStop Color="#FFD5DAE3" Offset="0.49"/>
  <GradientStop Color="#FFCED4DF" Offset="0.5"/>
  <GradientStop Color="#FFCED4DF" Offset="1"/>
</LinearGradientBrush>

Gray color rule for selected but unfocused tab

Gray color rule for selected but unfocused tab


Gray selected tab when Solution Explorer is active

Gray selected tab when Solution Explorer is active

Update: Added white color to modification markers in the style.

December 13, 2011

Add-in settings

Filed under: Uncategorized — Tags: — Sergey Vlasov @ 9:57 pm

I’ve added more organization to add-in settings storage and activation configuration.

Previously add-ins stored global settings in the add-ins directory near the binary files. Now I’ve added the GetAddinSettingsDirectory method to the ITabsStudioEngine interface providing a directory near general Tabs Studio settings. It makes possible to have separate add-in settings for SSMS 2008 and Visual Studio 2008.

Previously all .dll add-ins from the add-ins directory were loaded at startup. Now the list of active add-ins is stored near general Tabs Studio settings. You control this list as usual from Add-in Manager. It again makes now possible to have separate active add-ins for SSMS 2008 and Visual Studio 2008.

Export/import settings now save and restore all add-in settings as well.

Download link: Tabs Studio v2.6.0.

November 28, 2011

Sorting by project and extension

Filed under: Uncategorized — Tags: — Sergey Vlasov @ 10:10 pm

I’ve added the ability to sort tabs by project and extension:

Sorter Options

Sorter Options


A tab can have several extensions. To simplify sorting by extension behavior, only the first extension present on tab creation is used for sorting. You can select the Re-sort tabs context menu command to reset it.

For example, if Sorter is set up to sort only by extension and you open Form1.cs [Design] and stdafx.h:

Sorting by extension

Sorting by extension


Now you open stdafx.cpp. The stdafx tab keeps second position because “only the first extension present on tab creation is used for sorting” – in our case .h:
Order not changed when a new extension is added

Order not changed when a new extension is added


But if we Re-sort tabs, then .cpp becomes the primary extension for the stdafx tab and it moves before Form1:
Re-sorted tabs

Re-sorted tabs


Please, let me know if you find sorting by extension actually useful for your work :)

The updated Sorter add-in is included in Tabs Studio v2.5.7.

November 17, 2011

Sorting by full tab name

Filed under: Uncategorized — Tags: — Sergey Vlasov @ 8:12 am

Depending on the project type you are working on, Tabs Studio settings and add-ins enabled, tabs may have a path in the tab name. The Sorter add-in compares tab names without path, so for an ASP.NET website project, tabs are sorted like this:

Sorting without path

Sorting without path


I’ve added the option to sort by full tab name. You can enable it in Tabs Studio – Add-in manager – Sorter options:
Sorter Options

Sorter Options


With this option enabled the same tabs are now sorted like this:
Sorting with path

Sorting with path


The updated Sorter add-in is included in Tabs Studio v2.5.6.

October 18, 2011

Less rows priority

Filed under: Uncategorized — Tags: — Sergey Vlasov @ 8:50 am

Sometimes you get tabs arranged in more rows than necessary:

Tabs in 4 rows

Tabs in 4 rows


The same tabs in 3 rows

The same tabs in 3 rows

This is because the current tab layout algorithm first of all tries to minimize distracting tab movement between rows (keeping tab in the last position, reserving a row buffer for new tabs and changes in tab width).

I’ve added the new LessRowsPriority property to let you customize this behavior. (Remember also the RowBuffer property.) The larger LessRowsPriority value the more actively Tabs Studio will try to minimize number of rows. It is a double with default value of 1. Value of 10 is kind of high priority and value of 100 – very high priority. You can set it in a custom style like this:

<Style TargetType="TabsStudio:Tabs" BasedOn="{StaticResource DefaultTabsStyle}">
  <Setter Property="LessRowsPriority" Value="10"/>
</Style>

October 17, 2011

Priority group

Filed under: Uncategorized — Tags: — Sergey Vlasov @ 10:32 pm

If you have a frequently accessed tab that is open for a long time, you may want to position it at the beginning of the list for easier access and better tabs organization. The new PriorityGroup add-in lets you add such tab to the priority group and will keep it at the beginning when this tab is open:

Adding a tab to the priority group

Adding a tab to the priority group

Priority tabs are identified by tab name and work globally across all solutions. To remove a tab from the priority group, right click on the tab and select Remove from priority group.

You can color priority tabs using the new TabsStudioPriorityGroup:Properties.Top property. For example, in the standard Tab Coloring Rule dialog, add the following custom condition:

<Condition Binding="{Binding Path=(TabsStudioPriorityGroup:Properties.Top),
  RelativeSource={RelativeSource Self}}" Value="True"/>
A tab coloring rule for priority tabs

A tab coloring rule for priority tabs

The Sorter add-in now recognizes if PriorityGroup is running and sorts priority tabs first:

Sorter and PriorityGroup sort and prioritize tabs

Sorter and PriorityGroup sort and prioritize tabs

PriorityGroup will be included in the next Tabs Studio release.

September 27, 2011

Visual Studio 11 Developer Preview support

Filed under: Uncategorized — Tags: — Sergey Vlasov @ 7:27 pm

I’ve added basic support for Visual Studio 11 Developer Preview – all tabs functionality that was available in VS 2010 is now available in VS 11.

The new preview tab is displayed as a normal tab, but you can see the blue under line when it is selected. To manually promote this tab you can use the Window menu and the keyboard shortcut (btw this screenshot was made on Windows 8):

Promote preview tab command in Visual Studio menu

Promote preview tab command in Visual Studio menu

I don’t know how useful the preview tab will be. It can be turned off in Visual Studio options. On the other hand, floating tab groups are definitely useful and I will try my best to support them in a next release.

I noticed one new problem in VS 11 – tabs in a separate window can get light grey background inheriting style from a Visual Studio control up in the tree. To work around this, use the following custom style (it is the same example style that disables blue inactive tab background on mouse over):

<Style TargetType="TabsStudio:Tab" BasedOn="{StaticResource DefaultTabStyle}">
  <Setter Property="Template">
    <Setter.Value>

      <ControlTemplate TargetType="{x:Type TabsStudio:Tab}">
        <Border Background="{TemplateBinding Background}" Padding="5,1,5,1"
                      BorderThickness="1,1,1,0" BorderBrush="Gray">
        <ContentPresenter Name="Content" ContentSource="Header"
              HorizontalAlignment="{Binding Path=HorizontalContentAlignment,
                RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
        </Border>
      </ControlTemplate>
    </Setter.Value>

  </Setter>
</Style>

Download link: Tabs Studio v2.5.0.

September 17, 2011

Document tabs in Visual Studio 11 Developer Preview

Filed under: Uncategorized — Tags: — Sergey Vlasov @ 3:51 pm

Visual Studio 11 Developer Preview was released this week:

Visual Studio 11 Developer Preview

Visual Studio 11 Developer Preview

Tabs can be pinned now and remain always visible – in the same row with normal tabs, in a separate row above normal tabs and in several rows above normal tabs:

Pinned tabs in a separate row above normal tabs

Pinned tabs in a separate row above normal tabs

Documents opened indirectly, e.g. when you hit a breakpoint in a new file, are displayed in a special preview tab. When you hit a next breakpoint in another new file, the preview tab displays the new file and “forgets” about the previous one. Thus reducing the number of open documents:

The blue preview tab during debugging

The blue preview tab during debugging

Floating documents can be grouped in a separate window and have tab groups within this separate window:

Floating document in a separate window with two vertical tab groups

Floating document in a separate window with two vertical tab groups

Several self-explanatory options are available to customize tabs and windows behavior:

Tabs and windows options

Tabs and windows options

I’ve managed to run Tabs Studio in the new IDE, but need more time to make a proper release:

Tabs Studio tabs in Visual Studio 11 Developer Preview

Tabs Studio tabs in Visual Studio 11 Developer Preview

August 9, 2011

Unified layouts

Filed under: Uncategorized — Sergey Vlasov @ 10:46 am

After the introduction of the Stable tabs layout, Standard and Wrap became obsolete and I’ve finally removed them. I’ve also renamed Stable to Horizontal and Stack to Vertical:

Updated tabs layout option

Updated tabs layout option

Download link: Tabs Studio v2.4.2.

July 30, 2011

Import and export settings

Filed under: Uncategorized — Sergey Vlasov @ 8:21 pm

I’ve added the ability to export and import Tabs Studio settings for backup purposes and to copy Tabs Studio settings to another computer:

Export settings and Import settings buttons

Export settings and Import settings buttons

Tabs Studio keeps separate settings for VS 2010, VS 2008 and SSMS. If you use several products, export saves all settings and the additional dialog lets you select which settings you want to import:

Products selection for settings import

Products selection for settings import

Settings are stored in a .tssettings zip file and mirror the directory structure of settings in “c:\Users\[username]\AppData\Roaming\Sergey Vlasov”.

Download link: Tabs Studio v2.4.1.

Older Posts »

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