This commit is contained in:
Sergey Shakhnazarov 2019-10-24 11:26:24 +03:00
Родитель bb0bf70f99
Коммит b360dfa448
1 изменённых файлов: 9 добавлений и 9 удалений

Просмотреть файл

@ -711,11 +711,11 @@ namespace Xwt.WPFBackend
e.Handled = true;
}
internal void WidgetMouseDownForDragHandler(object o, MouseButtonEventArgs e)
{
SetupDragRect(e);
}
internal void WidgetMouseDownForDragHandler(object o, MouseButtonEventArgs e)
{
SetupDragRect(e);
}
void WidgetMouseUpHandler (object o, MouseButtonEventArgs e)
{
var args = e.ToXwtButtonArgs (Widget);
@ -818,7 +818,7 @@ namespace Xwt.WPFBackend
DragDropInfo.TargetTypes = types == null ? new TransferDataType [0] : types;
Widget.MouseUp += WidgetMouseUpForDragHandler;
Widget.MouseMove += WidgetMouseMoveForDragHandler;
Widget.MouseDown += WidgetMouseDownForDragHandler;
Widget.MouseDown += WidgetMouseDownForDragHandler;
}
private void SetupDragRect (MouseEventArgs e)
@ -829,7 +829,7 @@ namespace Xwt.WPFBackend
DragDropInfo.DragRect = new Rect (loc.X - width / 2, loc.Y - height / 2, width, height);
}
internal void WidgetMouseUpForDragHandler (object o, EventArgs e)
internal void WidgetMouseUpForDragHandler (object o, EventArgs e)
{
DragDropInfo.DragRect = Rect.Empty;
}
@ -842,7 +842,7 @@ namespace Xwt.WPFBackend
return;
if (DragDropInfo.DragRect.IsEmpty)
return;
return;
if (DragDropInfo.DragRect.Contains (e.GetPosition (Widget)))
return;
@ -1101,7 +1101,7 @@ namespace Xwt.WPFBackend
Task IDispatcherBackend.InvokeAsync(Action action)
{
var ts = new TaskCompletionSource<int>();
var result = Widget.Dispatcher.BeginInvoke((Action)delegate
var result = Widget.Dispatcher.BeginInvoke((Action)delegate
{
try
{