Tabs Studio Blog (organizing Visual Studio document tabs)

March 10, 2011

Marker context menu commands

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

I’ve added ability to highlight a tab or remove highlighting from the context menu. You can now also remove highlighting from all tabs at once and close all tabs that are not currently highlighted:

Marker context menu commands

Marker context menu commands


I’ve also fixed loss of highlighting in Visual Studio 2010 when switching to the full screen mode or starting a debug session.

Download link: Marker v1.0.1.

March 4, 2011

Highlight tabs with Marker

Filed under: Uncategorized — Tags: , — Sergey Vlasov @ 2:42 pm

David Peris suggested an interesting idea for Tabs Studio: “For people like me working in huge solutions, with a bunch of projects and files, sometimes we need to highlight a few tabs, temporarily, to quickly come back to them. Color rules would make the trick if the tabs share some criteria, but they can be slow to setup just for temporary highlighting. It would be great to be able to quick color some tabs, like for example Ctrl+click a tab would highlight it, and Ctrl+click again would de-highlight it. Maybe an option in the right click menu as “Remove highlights” or something like that would be the perfect complement to this option.”

I’ve created the new Marker add-in for this functionality. Ctrl+Click a tab highlights it and Ctrl+Click again removes highlighting. No additional context menu options yet, but it can be added later:

Several tabs highlighted with the default style

Several tabs highlighted with the default style

The default highlighting style provided by Marker decorates TabInternals with the red gradient background. You can choose to decorate another tab element or just change the highlighting color in a custom Tabs Studio style:

<Style TargetType="TabsStudio:TabInternals" BasedOn="{StaticResource DefaultTabInternalsStyle}">
    <Style.Triggers>
      <DataTrigger Binding="{Binding Path=(TabsStudioMarker:Properties.IsHighlighted), 
                 RelativeSource={RelativeSource AncestorType=TabsStudio:Tab}}" Value="True">
          <Setter Property="Background">
              <Setter.Value>
                   <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                       <GradientStop Color="Transparent" Offset="0.8"/>
                       <GradientStop Color="Green" Offset="1"/>
                   </LinearGradientBrush>
              </Setter.Value>
          </Setter>
      </DataTrigger>
  </Style.Triggers>
</Style>
Tabs highlighted with the custom green color

Tabs highlighted with the custom green color

Download link: Marker v1.0.0.

February 28, 2011

Open all corresponding files at once

Filed under: Uncategorized — Tags: — Sergey Vlasov @ 5:20 pm

If you use large tab groups, for example with test classes, you may find the new OpenAll add-in useful. OpenAll adds the new Open all context menu command to open all available corresponding files at once:

Open all context menu command

Open all context menu command


All corresponding files opened

All corresponding files opened


Download link: OpenAll v1.0.1.

February 18, 2011

Closing tabs to the right

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

Another feature from web browsers that you may be familiar with – a context menu command to close all tabs to the right of the selected tab. You can now have it in Tabs Studio with the new CloseRight add-in:

Close tabs to the right context menu command

Close tabs to the right context menu command

Download link: CloseRight v1.0.0.

February 17, 2011

Opening a new tab next to the current one

Filed under: Uncategorized — Tags: — Sergey Vlasov @ 8:56 pm

Many Internet browsers give you an option to open a new tab next to the current one. If you like this behavior you can now have it in Tabs Studio with the new OpenNext add-in. OpenNext doesn’t have any options and just changes default placement for a new tab from the right end to the right of the active tab.

Download link: OpenNext v1.0.0.

November 18, 2010

Updating a style from add-ins

Filed under: Uncategorized — Tags: , — Sergey Vlasov @ 11:09 am

Continuing work on reducing necessity to manually craft a XAML style, I’ve added the ability to update a style from an add-in. For example, previously for SingleRow and Shaper add-ins you needed to copy sample styles from documentation and to use them together you needed to merge these styles. Newly updated SingleRow and Shaper programmatically apply default styles not cluttering the custom style:

Default SingleRow and Shaper styles

Default SingleRow and Shaper styles


The only thing missing from the sample Chrome style for Shaper is the grey line under the tabs, as currently only setters and triggers can be automatically merged, not control templates. To make it perfect, the following custom style can be used:

<Style TargetType="TabsStudio:TabsHost" BasedOn="{StaticResource DefaultTabsHostStyle}">
  <Setter Property="Template">
    <Setter.Value>
      <ControlTemplate TargetType="{x:Type TabsStudio:TabsHost}">
       <StackPanel>  
        <Grid Panel.ZIndex="1">
          <Rectangle Width="{TemplateBinding Width}"
                     Height="{TemplateBinding Height}"
                     Fill="{TemplateBinding Background}"/>
          <Grid>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter Grid.Column="0"/>
            <TabsStudioSingleRow:HiddenTabs Grid.Column="1" TabsPanel="{TemplateBinding ContentControl.Content}"/>
          </Grid>
        </Grid>
      <Border Height="1" Background="#93979D"/>
      </StackPanel>
      </ControlTemplate>
    </Setter.Value>
  </Setter>
</Style>
The manually merged TabsHost style for SingleRow and Shaper

The manually merged TabsHost style for SingleRow and Shaper

Internally, the void UpdatePresentationStyles(string key, Presentation presentation) method was added to the TabsStudioExt.ITabsStudioEngine interface. It is possible to update styles dynamically, but right now SingleRow and Shaper do it only once in the OnConnection handler.

Triggers and setters for default Tabs Studio controls are added to the Styles property. For new controls (like TabsStudioSingleRow:HiddenTabs) a style resource and a default style usage are provided in the Presentation constructor:

private void UpdatePresentationStyle()
{
    TabsStudioExt.Presentation presentation = new TabsStudioExt.Presentation(
        LoadString("HiddenTabsStyle.xml"), LoadString("HiddenTabsUsage.xml"));
    {
        TabsStudioExt.PresentationStyle style = new TabsStudioExt.PresentationStyle();
        style.Triggers.Add(LoadString("TabTriggers.xml"));
        presentation.Styles.Add("TabsStudio:Tab", style);
    }
    {
        TabsStudioExt.PresentationStyle style = new TabsStudioExt.PresentationStyle();
        style.Setters.Add(LoadString("TabsHostTemplate.xml"));
        presentation.Styles.Add("TabsStudio:TabsHost", style);
    }
    engine.UpdatePresentationStyles("SingleRow", presentation);
}

The style parameter in the Presentation constructor can also add static resources for use in tab coloring rules. Theoretically it may be a custom brush or a generated color. These changes are included in the upcoming Tabs Studio release.

November 13, 2010

A color picker and a toolbar for AvalonStyleEditor

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

I’ve added the ColorComb based color picker to the AvalonStyleEditor add-in:

Color Picker dialog in Tabs Studio

Color Picker dialog in Tabs Studio


When you open the color picker dialog, a color under the caret is loaded as the current color. After you select a new color in the dialog it overwrites the old color in the style editor. You can open the color picker from the editor toolbar and with the Ctrl+P keyboard shortcut.

I’ve also added the toolbar to the style editor that is present both on the Style page and in the Tab Coloring Rule dialog:

The editor toolbar on the Style page

The editor toolbar on the Style page


Download link: AvalonStyleEditor v1.0.1.

October 24, 2010

Using AvalonEdit as a style editor in Tabs Studio

Filed under: Uncategorized — Tags: — Sergey Vlasov @ 1:25 pm

Tabs Studio v2.1.5 makes possible to customize the style editor and the new AvalonStyleEditor add-in uses the AvalonEdit editor from the SharpDevelop IDE for style editing in Tabs Studio:

AvalonEdit style editor in Tabs Studio

AvalonEdit style editor in Tabs Studio

Out of the box AvalonEdit supports XML syntax highlighting, line numbers and block indent (select several lines and press Tab of Shift+Tab). I’ve also added the Ctrl+OemQuestion keyboard shortcut to comment and uncomment selected text.

AvalonEdit is easily extensible – more features like code completion and folding can be added later. Or completely different style editor control can be added to Tabs Studio in a separate add-in.

Download link: AvalonStyleEditor v1.0.0.

October 20, 2010

Limiting number of tab rows

Filed under: Uncategorized — Tags: , — Sergey Vlasov @ 8:37 am

Due to popular demand and new tabs panel customization capabilities in Tabs Studio v2.1.2, I’ve created the SingleRow add-in that allows you to limit maximum number of tab rows and show remaining tabs in a drop-down list similar to default Visual Studio behavior:

A single row of tabs and the drop-down list of hidden tabs

A single row of tabs and the drop-down list of hidden tabs


To use SingleRow you need to set tabs layout to Wrap and apply the following style changes:
The Wrap tabs layout option

The Wrap tabs layout option

<Style TargetType="TabsStudio:TabsHost" BasedOn="{StaticResource DefaultTabsHostStyle}">
  <Setter Property="Template">
    <Setter.Value>
      <ControlTemplate TargetType="{x:Type TabsStudio:TabsHost}">
        <Grid>
          <Rectangle Width="{TemplateBinding Width}"
                     Height="{TemplateBinding Height}"
                     Fill="{TemplateBinding Background}"/>
          <Grid>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter Grid.Column="0"/>
            <TabsStudioSingleRow:HiddenTabs Grid.Column="1" TabsPanel="{TemplateBinding ContentControl.Content}"/>
          </Grid>
        </Grid>
      </ControlTemplate>
    </Setter.Value>
  </Setter>
</Style>

<Style TargetType="TabsStudio:Tab" BasedOn="{StaticResource DefaultTabStyle}">
  <Style.Triggers>
    <Trigger Property="TabsStudioSingleRow:Properties.IsTabHidden" Value="True">
      <Setter Property="Visibility"  Value="Collapsed"/>
    </Trigger>
  </Style.Triggers>
</Style>

<Style TargetType="TabsStudioSingleRow:HiddenTabs">
  <Setter Property="Content" Value=">"/>
  <Setter Property="Margin" Value="2,0,2,0"/>
  <Setter Property="VerticalAlignment" Value="Center"/>
  <Style.Triggers>
    <Trigger Property="TabsStudioSingleRow:Properties.IsHiddenTabs" Value="False">
      <Setter Property="Visibility"  Value="Collapsed"/>
    </Trigger>
  </Style.Triggers>
</Style>

This style adds the TabsStudioSingleRow:HiddenTabs button to open the drop-down list and binds it to the corresponding TabsPanel. SingleRow doesn’t actually hide tabs – it only sets the IsTabHidden property for them. The style above sets tab visibility based on this property. HiddenTabs button’s appearance is also defined in this style and the button is collapsed when there are no hidden tabs.

Tabs are hidden in the least recently used order and don’t automatically reappear even when space becomes available. Hidden tabs in the drop-down list are sorted alphabetically.

Default number of tab rows is 1, but you can change it in the SingleRow add-in options dialog:

SingleRow options dialog

SingleRow options dialog


Two rows of tabs and the hidden tabs list

Two rows of tabs and the hidden tabs list


Download link: SingleRow v1.0.0.

September 27, 2010

Preinstalled Tabs Studio add-ins

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

I’ve included the most popular Tabs Studio add-ins in the Tabs Studio installer, so that you don’t have to download and install them separately:

Preinstalled Tabs Studio add-ins in the new Add-in Manager window

Preinstalled Tabs Studio add-ins in the new Add-in Manager window

After installation all these add-ins are disabled. You can easily enable them checking the Startup option in the new Add-in Manager window. Restart of Visual Studio is still required to actually load or unload add-ins. Internally, an active add-in is a regular dll file in the Add-in installation folder, while a disabled add-in is the same file renamed to have the inactive extension.

For loaded add-ins that support configuration via the TabsStudioExt.IConfigurable interface, the Options button is displayed. See the Navigator add-in as an example.

Download link: Tabs Studio v2.1.2.

« Newer PostsOlder Posts »

Blog at WordPress.com.