Tabs Studio Blog (organizing Visual Studio document tabs)

April 12, 2010

Close file buttons

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

I’ve added the close file button to each extension. It should be particularly useful in SSMS where you more often need to close a file rather than a whole tab:

Close file buttons in SSMS

Close file buttons in SSMS


In the default style these buttons are collapsed, but you can use all usual properties in a custom style to make them visible. For example, the following style makes close file buttons visible on the selected tab and hides the close tab button in a tab when it contains more than a one extension:

<Style TargetType="TabsStudio:TabExtensionCloseButton" BasedOn="{StaticResource DefaultTabExtensionCloseButton}">
  <Style.Triggers>
    <Trigger Property="IsTabSelected" Value="True">
      <Setter Property="Visibility" Value="Visible"/>
    </Trigger>
  </Style.Triggers>
</Style>

<Style TargetType="TabsStudio:CloseTabButton" BasedOn="{StaticResource DefaultCloseTabButtonStyle}">
  <Style.Triggers>
    <Trigger Property="IsMultiExtensions" Value="True">
      <Setter Property="Visibility" Value="Collapsed"/>
    </Trigger>
  </Style.Triggers>
</Style>

Blog at WordPress.com.