Skip to content

Commit

Permalink
MiddleMouseClickTabControl (RicoSuter#4096)
Browse files Browse the repository at this point in the history
- Added middle mouse click as a gesture to close tabs in NSwagStudio
  • Loading branch information
Sossenbinder authored and lahma committed Jan 20, 2024
1 parent cfa6f97 commit e553c38
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/NSwagStudio/Views/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,14 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>

<TextBlock Text="{Binding Document.Name}" VerticalAlignment="Center" Margin="0,2,0,0" />
<TextBlock Text="{Binding Document.Name}" VerticalAlignment="Center" Margin="0,2,0,0">
<TextBlock.InputBindings>
<MouseBinding
CommandParameter="{Binding}"
Command="{Binding CloseDocumentCommand, Source={StaticResource ViewModel}}"
Gesture="MiddleClick" />
</TextBlock.InputBindings>
</TextBlock>
<Button Grid.Column="1"
Content="X" Padding="6,2,6,2" Margin="8,3,0,2"
CommandParameter="{Binding}"
Expand Down

0 comments on commit e553c38

Please sign in to comment.