Tabs Studio Blog (organizing Visual Studio document tabs)

November 29, 2010

Tabs Studio v2.2.1 released

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

Tabs Studio v2.2.1 released:

  • Added the Check for product updates on startup option.
  • Added support for solution folders when looking for corresponding files.
  • Changed extensions sorting to place extensions without a dot at the end.
  • Changed the Don’t group designer files regex snippet to include more files.
  • Fixed incorrect installation when VS uses the Visual Studio 10 folder instead of Visual Studio 2010.

November 27, 2010

Automatic updates

Filed under: Uncategorized — Sergey Vlasov @ 2:38 pm

I’ve added the Check for product updates on startup option:

The check for updates option

The check for updates option


It is off by default. When enabled, once a day at startup Tabs Studio checks the update.xml file. On a new public release (that occurs about once a month) you will be able to easily see what’s new and download the installer:
Tabs Studio Update

Tabs Studio Update

November 19, 2010

Tabs Studio v2.2.0 released

Filed under: Releases — Sergey Vlasov @ 9:20 pm

Tabs Studio v2.2.0 released:

  • Added the ability to customize the style from add-ins.
  • Added default styles to SingleRow and Shaper.
  • Added SingleRow and AvalonStyleEditor to the Tabs Studio installer.
  • Added sample snippets and the ability to revert to default for title and path grouping regular expressions.
  • Added a warning message to SingleRow when the tabs layout mode is not Wrap.
  • Added the 1 second delay before activating a tab when dragging a text over its header.
  • Updated system requirements to have .NET 3.5 SP1 installed.
  • Changed numeric color values to color names in the new tab coloring rule template.
  • Fixed Disambiguator not working with the Remove path from tab name option.
  • Fixed an installation for SSMS when Visual Studio is not installed.
  • Fixed a rare unhandled exception when closing tabs introduced in v2.1.7.

Grouping regex snippets

Filed under: Uncategorized — Sergey Vlasov @ 12:00 pm

I’ve added several sample regular expressions for Title grouping regex and Path grouping regex that you can select from the new drop-down button menu:

Title grouping snippets

Title grouping snippets


Path grouping snippets

Path grouping snippets


Most snippets are added as an additional OR expression to the beginning of the corresponding regex, except Revert to default and Group all directories that replace the regex. Class is just a placeholder in title snippet names – corresponding regex will work for any class name. Same with Dir and Subdir in path snippet names.

For example, here is the effect of adding all 3 available Title grouping regex snippets on tabs grouping:

Default grouping

Default grouping


All Class tabs grouped together and Designer.cs in a separate tab

All Class tabs grouped together and Designer.cs in a separate tab

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 15, 2010

Tabs Studio v2.1.7 released

Filed under: Releases — Sergey Vlasov @ 2:20 pm

Tabs Studio v2.1.7 released – added the Paths tab property, added Document paths regex and Custom conditions options to the Tab Coloring Rule dialog, fixed unescaped back slashes in regex tab coloring rules.

More tab coloring options

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

I’ve added Document paths regex and Custom conditions options to the Tab Coloring Rule dialog:

The Tab Coloring Rule dialog with new options

The Tab Coloring Rule dialog with new options

Document paths regex uses the newly added Paths tab item property consisting of document paths ending with ‘$’. For a tab “App .xaml .xaml.cs” Paths is something like “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 the following expression:

\.(xaml|xaml\.cs)\$

The Custom conditions option allows you to switch on tab item 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"/>

Another example is for the case when you want to change the color of a tab in Visual Studio 2010 when tabs are not focused:

<Condition Binding="{Binding Path=IsGroupFocused, RelativeSource={RelativeSource Self}}" Value="False"/>

Download link: TabsStudio v2.1.7.

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.

November 12, 2010

Color picker

Filed under: Uncategorized — Sergey Vlasov @ 2:56 pm

I selected a color picker for a style editor in Tabs Studio and here is a list of most interesting open source WPF dialog based color pickers that I found (not commercial and not drop-down color picker controls).

Windows common color dialog

First of all there is the common Windows color dialog. Providing consistent user experience since 1990:

Edit Colors dialog in Windows 7

Edit Colors dialog in Windows 7


Color selector dialogs in Windows 3.1

Color selector dialogs in Windows 3.1

Simple WPF Color Picker by Sacha Barber

Sacha Barber wrote the CodeProject article about his WPF color picker and later Mark Treadwell did various enhancements on this code. Still color position is not preserved when switching swatches, colors range on swatches is limited and there are no additional controls to tune color other than transparency.

WPF Color Picker by Sacha Barber and Mark Treadwell

WPF Color Picker by Sacha Barber and Mark Treadwell

Color Picker Custom Control from Windows SDK

You can find it in the “c:\Program Files\Microsoft SDKs\Windows\v7.0\Samples\WPFSamples.zip” archive on your machine and read about it in the Uncommon Dialogs: Font Chooser & Color Picker Dialogs blog post. Functional, but requires more polishing for practical use.

WPF Color Picker Custom Control sample from Windows SDK

WPF Color Picker Custom Control sample from Windows SDK

Color Picker from SharpDevelop

Open source SharpDevelop IDE contains a color picker with a nice conventional design.

Color Picker from SharpDevelop

Color Picker from SharpDevelop

ColorComb by Shawn A. Van Ness

Shawn A. Van Ness developed the ColorComb color-picker dialog with the ability to adjust stylus stroke properties. It is very easy to select a color you have in mind looking at the comb and use the brightness slider for fine tuning. Cells in the comb provide palette like qualities allowing to choose a distinctive collection of colors. Lack of HSV and RGB controls ensures less distraction when selecting a color.

ColorComb by Shawn A. Van Ness

ColorComb by Shawn A. Van Ness

ColoRotate

ColoRotate is an online service allowing you to select colors in 3D. It positions itself as the most intuitive way to work with colors “in a way that matches how our minds process color.” The site has an interactive demonstration showing how “our visual nerves register color in terms of the attributes of color: the amount of green-or-red; the amount of blue-or-yellow; and the brightness.”

ColoRotate browser

ColoRotate browser

Colors dialog in Microsoft Office 2007

Colors dialog in Office 2007 has a design very similar to ColorComb plus it has comparison between a new and the current colors.

Colors dialog in Microsoft Office 2007

Colors dialog in Microsoft Office 2007

ColorComb simplified

To be a part of a XAML editor in Tabs Studio, I liked ColorComb most. I removed ink-specific settings from the dialog and added the current color for comparison.

ColorComb without ink-specific settings

ColorComb without ink-specific settings


If you want to use this ColorComb modification in your application, following is the download link: ColorPickerSampleSV.zip.

 

 

Organize Visual Studio tabs with Tabs Studio add-in

November 6, 2010

Tabs Studio v2.1.6 released

Filed under: Releases — Sergey Vlasov @ 5:04 pm

Tabs Studio v2.1.6 released:

  • Added tab coloring parameters and the Set color context menu command.
  • Added TabName and ProjectName tab item properties.
  • Added RegexMatch converter to default style resources.
  • Replaced the Quick Style dialog with Presentation options.
  • Changed DefaultTabExtensionCloseButton style key to DefaultTabExtensionCloseButtonStyle.
  • Deleted Projector from prepackaged add-ins.
Older Posts »

Blog at WordPress.com.