Tabs Studio Blog (organizing Visual Studio document tabs)

April 18, 2019

Customizing TrackEd colors

Filed under: Uncategorized — Tags: — Sergey Vlasov @ 9:56 am

TrackEd add-in shows a yellow or green bar in the tab title for modified and saved documents:

You can customize these colors first by applying the following Tabs style (copied from TrackEd source):

<Style TargetType="TabsStudio:TabNameModificationMarker" BasedOn="{StaticResource DefaultTabNameModificationMarkerStyle}">
<Setter Property="Template">
  <Setter.Value>
    <ControlTemplate TargetType="{x:Type TabsStudio:TabNameModificationMarker}">
      <TextBlock Name="TabNameModificationMarkerTextBlock" Padding="0" Margin="3,2,0,2"  Text=" "/>
      <ControlTemplate.Triggers>
        <DataTrigger Binding="{Binding Path=(TabsStudioTrackEd:Properties.DocStatus),
                 RelativeSource={RelativeSource AncestorType=TabsStudio:TabNameGroup}}" Value="Dirty">
          <Setter TargetName="TabNameModificationMarkerTextBlock" Property="TextBlock.Background" Value="#E5AC00"/>
          <Setter Property="Visibility" Value="Visible"/>
        </DataTrigger>
        <DataTrigger Binding="{Binding Path=(TabsStudioTrackEd:Properties.DocStatus),
                 RelativeSource={RelativeSource AncestorType=TabsStudio:TabNameGroup}}" Value="Saved">
          <Setter TargetName="TabNameModificationMarkerTextBlock" Property="TextBlock.Background" Value="#009900"/>
          <Setter Property="Visibility" Value="Visible"/>
        </DataTrigger>
      </ControlTemplate.Triggers>
    </ControlTemplate>
  </Setter.Value>
</Setter>
</Style>

<Style TargetType="TabsStudio:TabExtensionModificationMarker" BasedOn="{StaticResource DefaultTabExtensionModificationMarkerStyle}">
<Setter Property="Template">
  <Setter.Value>
    <ControlTemplate TargetType="{x:Type TabsStudio:TabExtensionModificationMarker}">
      <TextBlock Name="TabExtensionModificationMarkerTextBlock" Padding="0" Margin="0,2,0,2"  Text=" "/>
      <ControlTemplate.Triggers>
        <DataTrigger Binding="{Binding Path=(TabsStudioTrackEd:Properties.DocStatus),
                 RelativeSource={RelativeSource AncestorType=TabsStudio:TabExtensionGroup}}" Value="Dirty">
          <Setter TargetName="TabExtensionModificationMarkerTextBlock" Property="TextBlock.Background" Value="#E5AC00"/>
          <Setter Property="Visibility" Value="Visible"/>
        </DataTrigger>
        <DataTrigger Binding="{Binding Path=(TabsStudioTrackEd:Properties.DocStatus),
                 RelativeSource={RelativeSource AncestorType=TabsStudio:TabExtensionGroup}}" Value="Saved">
          <Setter TargetName="TabExtensionModificationMarkerTextBlock" Property="TextBlock.Background" Value="#009900"/>
          <Setter Property="Visibility" Value="Visible"/>
        </DataTrigger>
      </ControlTemplate.Triggers>
    </ControlTemplate>
  </Setter.Value>
</Setter>
</Style>

And then change colors for the name and extension to your values. For example, after changing default #E5AC00 Dirty color to #D90000 it looks like this:

April 10, 2019

Tab coloring rules generator

Filed under: Uncategorized — Tags: — Sergey Vlasov @ 10:07 am

The Tab coloring rule dialog lets you conveniently define background and foreground colors for a tab matching specific criteria:

The same rule can be also defined as an XAML Tabs style:

<Style TargetType="TabsStudio:Tab" BasedOn="{StaticResource DefaultTabStyle}">
    <Style.Triggers>
        <MultiDataTrigger>
            <MultiDataTrigger.Conditions>
                <Condition Binding="{Binding Path=Paths, RelativeSource={RelativeSource Self}, 
                		Converter={StaticResource RegexMatch},ConverterParameter='WpfApp1'}" Value="True"/>
                <Condition Binding="{Binding Path=IsTabSelected, RelativeSource={RelativeSource Self}}" Value="True"/>
            </MultiDataTrigger.Conditions>
            <Setter Property="Background">
                <Setter.Value>
                     <LinearGradientBrush StartPoint="0,0" EndPoint="0,1"> <GradientStop Color="#e87400" Offset="0"/> <GradientStop Color="#0089E1" Offset="1"/> </LinearGradientBrush>
                </Setter.Value>
            </Setter>  
            <Setter Property="Foreground">
                <Setter.Value>
                     <SolidColorBrush Color="White"/>
                </Setter.Value>
            </Setter>  
        </MultiDataTrigger>
    </Style.Triggers>
</Style>

If you have many similar tab coloring rules, instead of using the Tab coloring rule dialog you may consider generating an XAML style programmatically and then copy it to Tabs Studio.

TStyle.zip is a sample project for Visual Studio 2019 using a T4 Text Template that generates 3 styles for a project tab, selected project tab and previously selected project tab given a project path and a base background color. If you want to define these styles for multiple projects, in the tab.tt file just add a path-color pair to the dictionary, save the file and copy generated tab.txt file contents as Tabs style:

<# var rules = new Dictionary<string, string> { {"WebApplication1", "#800000"}, {"WpfApp1", "#e87400"} }; #>

April 7, 2019

Tabs Studio v4.6.1 released

Filed under: Releases — Sergey Vlasov @ 10:36 pm

Tabs Studio v4.6.1 released:

  • Fixed the Navigator add-in shipped with v4.6.0, interfering with tabs visibility on startup and other add-ins like OrderKeeper.
  • Updated installer progress text for Visual Studio 2019 integration.

Download link: Tabs Studio v4.6.1.

April 2, 2019

Tabs Studio v4.6.0 adds support for SSMS 18

Filed under: Releases — Tags: , — Sergey Vlasov @ 9:20 am

Tabs Studio v4.6.0 released:

  • Added support for SQL Server Management Studio 18.0 RC1.
  • Added the ability to show tab numbers with the Navigator add-in.
  • Improved reliability of the Visual Studio 2019 integration installer.
  • Fixed inactive tab text for the Visual Studio 2019 Blue theme.
Tabs Studio in  SQL Server Management Studio 18.0 RC1

Tabs Studio in SQL Server Management Studio 18.0 RC1

Download link: Tabs Studio v4.6.0.

February 6, 2019

Visual Studio 2019 inactive tab text

Filed under: Uncategorized — Tags: , — Sergey Vlasov @ 11:29 pm

Visual Studio 2019 Preview 2.2 includes an updated blue theme that makes inactive tab text in Tabs Studio invisible:

One workaround to fix it is applying the following Tabs style:

<Style TargetType="TabsStudio:Tab" BasedOn="{StaticResource DefaultTabStyle}">
  <Style.Triggers>
    <MultiTrigger>
      <MultiTrigger.Conditions>
        <Condition Property="IsGroupFocused" Value="False"/>
        <Condition Property="IsTabSelected"  Value="True"/>
      </MultiTrigger.Conditions>
      <Setter Property="Foreground" Value="{DynamicResource {x:Static vs_shell:EnvironmentColors.FileTabInactiveTextBrushKey}}"/>
    </MultiTrigger>
  </Style.Triggers>
</Style>

The fix will be included in the next Tabs Studio release.

January 18, 2019

Showing tab numbers

Filed under: Uncategorized — Tags: — Sergey Vlasov @ 12:55 pm

If you are using NavigateToTabXX commands to quickly switch tabs in Tabs Studio using keyboard, you may find the new Show tab numbers option very useful:

Download link: Navigator v1.1.8.

January 11, 2019

Tabs Studio v4.5.0 adds support for Visual Studio 2019

Filed under: Releases — Tags: — Sergey Vlasov @ 10:49 am

Tabs Studio v4.5.0 released:

  • Added support for Visual Studio 2019 Preview 1.1.
  • Added a new sorting rule type TabNameUntransformed (it ignores tab title transformations by other add-ins) and made it the default one in the Sorter add-in.
  • Created the OrderKeeper add-in that remembers a tab position when it is closed and restores the position when the tab is reopened.
  • Created the OpenDesigner add-in that adds a context menu command to open a corresponding [Design] view.
  • Changed the PriorityGroup add-in to ignore tab title transformations by other add-ins.
  • Changed the SuperName add-in to not add a project name to the PriorityGroup super group.
  • Added support for solution folders and database projects to the Sync add-in.
  • Removed the “Close All But Tool Windows” command from the context menu in VS 2017.
  • Fixed the Sorter add-in to correctly tag the fist super group tab after the PriorityGroup super group.
  • Fixed a Visual Studio hang when adding a tab to the priority group with Sorter and SuperName add-ins enabled.
Tabs Studio in Visual Studio 2019 Preview

Tabs Studio in Visual Studio 2019 Preview

Download link: Tabs Studio v4.5.0.

September 26, 2018

Keeping tabs order better

Filed under: Uncategorized — Sergey Vlasov @ 9:41 am

I’ve created a new add-in OrderKeeper that remembers a tab position when it is closed and restores the position when the tab is reopened. It should address the problem with tabs reordering when a project is externally modified by updating from source control or switching branches. You may also find stable tab position useful when you manually close and reopen a tab.

Download link: OrderKeeper v1.0.0.

July 27, 2018

Tabs Studio v4.4.0 released

Filed under: Releases — Sergey Vlasov @ 6:56 am

Tabs Studio v4.4.0 released:

  • Added AutoOpener, CloseClick, ITransform, Localizer, MRU, OpenAll, OrderEx and SuperName add-ins to the installer.
  • Added a confirmation for the “Remove all highlighting” command in the Marker add-in.
  • Added support for VS 2015+ to the CloseClick add-in.
  • Fixed InvalidCastException to type IVsExtensionManager on VS 2017 startup when Custom Document Well and VS 2010 are installed.

Download link: Tabs Studio v4.4.0.

June 12, 2018

Tabs Studio v4.3.2 released

Filed under: Releases — Sergey Vlasov @ 11:24 pm

Tabs Studio v4.3.2 released:

  • Fixed InvalidOperationException in Dispatcher.PushFrame on exiting Visual Studio 2017.
  • Fixed NullReferenceException in StyleHelper.ReleaseInstanceDataForTriggerBinding on exiting Visual Studio 2017.
  • Fixed installation verification for Visual Studio 2017 15.6+.
  • Improved detection of Custom Document Well in Visual Studio 2017.

Download link: Tabs Studio v4.3.2.

Older Posts »

Blog at WordPress.com.