mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 12:18:50 +02:00
Refactoring ContextMenu
1. Remove ItemDropEvent 2. Remove ShowContextMenus from API 3. Fix context menu item can't be opened ( #535 ), bug introduced from PR #494 (commit 45dbb50) 4. Move open result command and load context menu command back to MainViewModel 5. unify load context menu logic 6. other performance enhancement and potential bug fixed
This commit is contained in:
@@ -16,18 +16,14 @@
|
||||
<DataTemplate.DataType>
|
||||
<x:Type TypeName="vm:ResultViewModel" />
|
||||
</DataTemplate.DataType>
|
||||
<Button Command="{Binding OpenResultListBoxItemCommand}">
|
||||
<Button.InputBindings>
|
||||
<MouseBinding Command="{Binding OpenContextMenuItemCommand}" MouseAction="RightClick"></MouseBinding>
|
||||
</Button.InputBindings>
|
||||
<Button>
|
||||
<Button.Template>
|
||||
<ControlTemplate>
|
||||
<ContentPresenter Content="{TemplateBinding Button.Content}"></ContentPresenter>
|
||||
</ControlTemplate>
|
||||
</Button.Template>
|
||||
<Button.Content>
|
||||
<Grid HorizontalAlignment="Stretch" Height="40" VerticalAlignment="Stretch" Margin="5"
|
||||
Cursor="Hand">
|
||||
<Grid HorizontalAlignment="Stretch" Height="40" VerticalAlignment="Stretch" Margin="5" Cursor="Hand">
|
||||
<Grid.Resources>
|
||||
<converters:ImagePathConverter x:Key="ImageConverter" />
|
||||
</Grid.Resources>
|
||||
|
||||
Reference in New Issue
Block a user