Browse Source
Replaced obsolete PointerEventArgs.Device usages.
pull/3524/head
José Pedro
6 years ago
No known key found for this signature in database
GPG Key ID: B8247B9301707B83
2 changed files with
8 additions and
8 deletions
-
src/Avalonia.Controls.DataGrid/DataGridColumnHeader.cs
-
src/Avalonia.Controls/Calendar/CalendarItem.cs
|
|
|
@ -326,7 +326,7 @@ namespace Avalonia.Controls |
|
|
|
|
|
|
|
if (OwningGrid != null && OwningGrid.ColumnHeaders != null) |
|
|
|
{ |
|
|
|
args.Device.Capture(this); |
|
|
|
args.Pointer.Capture(this); |
|
|
|
|
|
|
|
_dragMode = DragMode.MouseDown; |
|
|
|
_frozenColumnsWidth = OwningGrid.ColumnsInternal.GetVisibleFrozenEdgedColumnsWidth(); |
|
|
|
@ -391,7 +391,7 @@ namespace Avalonia.Controls |
|
|
|
SetDragCursor(mousePosition); |
|
|
|
|
|
|
|
// Variables that track drag mode states get reset in DataGridColumnHeader_LostMouseCapture
|
|
|
|
args.Device.Capture(null); |
|
|
|
args.Pointer.Capture(null); |
|
|
|
OnLostMouseCapture(); |
|
|
|
_dragMode = DragMode.None; |
|
|
|
handled = true; |
|
|
|
|
|
|
|
@ -943,8 +943,8 @@ namespace Avalonia.Controls.Primitives |
|
|
|
{ |
|
|
|
CalendarDayButton b = (CalendarDayButton)sender; |
|
|
|
// The button is in Pressed state. Change the state to normal.
|
|
|
|
if (e.Device.Captured == b) |
|
|
|
e.Device.Capture(null); |
|
|
|
if (e.Pointer.Captured == b) |
|
|
|
e.Pointer.Capture(null); |
|
|
|
_lastCalendarDayButton = b; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -1213,8 +1213,8 @@ namespace Avalonia.Controls.Primitives |
|
|
|
{ |
|
|
|
CalendarButton b = (CalendarButton)sender; |
|
|
|
// The button is in Pressed state. Change the state to normal.
|
|
|
|
if (e.Device.Captured == b) |
|
|
|
e.Device.Capture(null); |
|
|
|
if (e.Pointer.Captured == b) |
|
|
|
e.Pointer.Capture(null); |
|
|
|
//b.ReleaseMouseCapture();
|
|
|
|
|
|
|
|
_lastCalendarButton = b; |
|
|
|
@ -1224,7 +1224,7 @@ namespace Avalonia.Controls.Primitives |
|
|
|
{ |
|
|
|
if (_lastCalendarDayButton != null) |
|
|
|
{ |
|
|
|
e.Device.Capture(_lastCalendarDayButton); |
|
|
|
e.Pointer.Capture(_lastCalendarDayButton); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -1232,7 +1232,7 @@ namespace Avalonia.Controls.Primitives |
|
|
|
{ |
|
|
|
if (_lastCalendarButton != null) |
|
|
|
{ |
|
|
|
e.Device.Capture(_lastCalendarButton); |
|
|
|
e.Pointer.Capture(_lastCalendarButton); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|