Browse Source
Merge pull request #3461 from jp2masa/update-obsolete-api-usages
Updated GotFocusEventArgs obsolete API usages
pull/3476/head
Dariusz Komosiński
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
14 additions and
3 deletions
-
src/Avalonia.Controls/ListBox.cs
-
src/Avalonia.Controls/TreeView.cs
-
src/Avalonia.Input/GotFocusEventArgs.cs
|
|
|
@ -124,7 +124,7 @@ namespace Avalonia.Controls |
|
|
|
e.Handled = UpdateSelectionFromEventSource( |
|
|
|
e.Source, |
|
|
|
true, |
|
|
|
(e.InputModifiers & InputModifiers.Shift) != 0); |
|
|
|
(e.KeyModifiers & KeyModifiers.Shift) != 0); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -406,7 +406,7 @@ namespace Avalonia.Controls |
|
|
|
e.Handled = UpdateSelectionFromEventSource( |
|
|
|
e.Source, |
|
|
|
true, |
|
|
|
(e.InputModifiers & InputModifiers.Shift) != 0); |
|
|
|
(e.KeyModifiers & KeyModifiers.Shift) != 0); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
// Copyright (c) The Avalonia Project. All rights reserved.
|
|
|
|
// Licensed under the MIT license. See licence.md file in the project root for full license information.
|
|
|
|
|
|
|
|
using System; |
|
|
|
using Avalonia.Interactivity; |
|
|
|
|
|
|
|
namespace Avalonia.Input |
|
|
|
@ -18,6 +19,16 @@ namespace Avalonia.Input |
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets any input modifiers active at the time of focus.
|
|
|
|
/// </summary>
|
|
|
|
public InputModifiers InputModifiers { get; set; } |
|
|
|
[Obsolete("Use KeyModifiers")] |
|
|
|
public InputModifiers InputModifiers |
|
|
|
{ |
|
|
|
get => (InputModifiers)KeyModifiers; |
|
|
|
set => KeyModifiers = (KeyModifiers)((int)value & 0xF); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets any key modifiers active at the time of focus.
|
|
|
|
/// </summary>
|
|
|
|
public KeyModifiers KeyModifiers { get; set; } |
|
|
|
} |
|
|
|
} |
|
|
|
|