Browse Source

Updated GotFocusEventArgs obsolete API usages.

pull/3461/head
José Pedro 6 years ago
parent
commit
ef15b80b12
No known key found for this signature in database GPG Key ID: B8247B9301707B83
  1. 2
      src/Avalonia.Controls/ListBox.cs
  2. 2
      src/Avalonia.Controls/TreeView.cs
  3. 13
      src/Avalonia.Input/GotFocusEventArgs.cs

2
src/Avalonia.Controls/ListBox.cs

@ -124,7 +124,7 @@ namespace Avalonia.Controls
e.Handled = UpdateSelectionFromEventSource(
e.Source,
true,
(e.InputModifiers & InputModifiers.Shift) != 0);
(e.KeyModifiers & KeyModifiers.Shift) != 0);
}
}

2
src/Avalonia.Controls/TreeView.cs

@ -406,7 +406,7 @@ namespace Avalonia.Controls
e.Handled = UpdateSelectionFromEventSource(
e.Source,
true,
(e.InputModifiers & InputModifiers.Shift) != 0);
(e.KeyModifiers & KeyModifiers.Shift) != 0);
}
}

13
src/Avalonia.Input/GotFocusEventArgs.cs

@ -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; }
}
}

Loading…
Cancel
Save