diff --git a/src/Avalonia.Controls.DataGrid/DataGridColumnHeader.cs b/src/Avalonia.Controls.DataGrid/DataGridColumnHeader.cs index 062fdeb4d3..bff2b500ae 100644 --- a/src/Avalonia.Controls.DataGrid/DataGridColumnHeader.cs +++ b/src/Avalonia.Controls.DataGrid/DataGridColumnHeader.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; diff --git a/src/Avalonia.Controls/Calendar/CalendarItem.cs b/src/Avalonia.Controls/Calendar/CalendarItem.cs index d6874e1ad6..5a2d1bbfd5 100644 --- a/src/Avalonia.Controls/Calendar/CalendarItem.cs +++ b/src/Avalonia.Controls/Calendar/CalendarItem.cs @@ -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); } }