mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-10 13:35:31 +02:00
Add drag support #44
This commit is contained in:
@@ -12,8 +12,8 @@
|
|||||||
Style="{DynamicResource WindowStyle}"
|
Style="{DynamicResource WindowStyle}"
|
||||||
Icon="Images\app.png"
|
Icon="Images\app.png"
|
||||||
>
|
>
|
||||||
<Border Style="{DynamicResource WindowBorderStyle}">
|
<Border Style="{DynamicResource WindowBorderStyle}" MouseDown="Border_OnMouseDown">
|
||||||
<Grid x:Name="grid">
|
<Grid x:Name="grid" >
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition ></RowDefinition>
|
<RowDefinition ></RowDefinition>
|
||||||
<RowDefinition></RowDefinition>
|
<RowDefinition></RowDefinition>
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ using ContextMenu = System.Windows.Forms.ContextMenu;
|
|||||||
using KeyEventArgs = System.Windows.Input.KeyEventArgs;
|
using KeyEventArgs = System.Windows.Input.KeyEventArgs;
|
||||||
using MenuItem = System.Windows.Forms.MenuItem;
|
using MenuItem = System.Windows.Forms.MenuItem;
|
||||||
using MessageBox = System.Windows.MessageBox;
|
using MessageBox = System.Windows.MessageBox;
|
||||||
|
using MouseButton = System.Windows.Input.MouseButton;
|
||||||
using ToolTip = System.Windows.Controls.ToolTip;
|
using ToolTip = System.Windows.Controls.ToolTip;
|
||||||
|
|
||||||
namespace Wox
|
namespace Wox
|
||||||
@@ -198,6 +199,11 @@ namespace Wox
|
|||||||
}, TimeSpan.FromMilliseconds(150));
|
}, TimeSpan.FromMilliseconds(150));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Border_OnMouseDown(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.ChangedButton == MouseButton.Left) DragMove();
|
||||||
|
}
|
||||||
|
|
||||||
private void StartProgress()
|
private void StartProgress()
|
||||||
{
|
{
|
||||||
progressBar.Visibility = Visibility.Visible;
|
progressBar.Visibility = Visibility.Visible;
|
||||||
|
|||||||
Reference in New Issue
Block a user