Browse Source

Fixed obsolete API usages.

pull/3604/head
José Pedro 6 years ago
parent
commit
a76d14650b
No known key found for this signature in database GPG Key ID: B8247B9301707B83
  1. 3
      src/Avalonia.Controls/ContextMenu.cs
  2. 4
      src/Avalonia.Input/NavigationDirection.cs
  3. 1
      src/Avalonia.Themes.Default/ComboBox.xaml
  4. 6
      src/Avalonia.Themes.Default/MenuItem.xaml

3
src/Avalonia.Controls/ContextMenu.cs

@ -104,8 +104,7 @@ namespace Avalonia.Controls
{
PlacementMode = PlacementMode.Pointer,
PlacementTarget = control,
StaysOpen = false,
ObeyScreenEdges = true
StaysOpen = false
};
_popup.Opened += PopupOpened;

4
src/Avalonia.Input/NavigationDirection.cs

@ -100,12 +100,12 @@ namespace Avalonia.Input
/// </returns>
public static NavigationDirection? ToNavigationDirection(
this Key key,
InputModifiers modifiers = InputModifiers.None)
KeyModifiers modifiers = KeyModifiers.None)
{
switch (key)
{
case Key.Tab:
return (modifiers & InputModifiers.Shift) != 0 ?
return (modifiers & KeyModifiers.Shift) != 0 ?
NavigationDirection.Next : NavigationDirection.Previous;
case Key.Up:
return NavigationDirection.Up;

1
src/Avalonia.Themes.Default/ComboBox.xaml

@ -37,7 +37,6 @@
MinWidth="{Binding Bounds.Width, RelativeSource={RelativeSource TemplatedParent}}"
MaxHeight="{TemplateBinding MaxDropDownHeight}"
PlacementTarget="{TemplateBinding}"
ObeyScreenEdges="True"
StaysOpen="False">
<Border BorderBrush="{DynamicResource ThemeBorderMidBrush}"
BorderThickness="1">

6
src/Avalonia.Themes.Default/MenuItem.xaml

@ -45,8 +45,7 @@
<Popup Name="PART_Popup"
PlacementMode="Right"
StaysOpen="True"
IsOpen="{TemplateBinding IsSubMenuOpen, Mode=TwoWay}"
ObeyScreenEdges="True">
IsOpen="{TemplateBinding IsSubMenuOpen, Mode=TwoWay}">
<Border Background="{TemplateBinding Background}"
BorderBrush="{DynamicResource ThemeBorderMidBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
@ -95,8 +94,7 @@
</ContentPresenter>
<Popup Name="PART_Popup"
IsOpen="{TemplateBinding IsSubMenuOpen, Mode=TwoWay}"
StaysOpen="True"
ObeyScreenEdges="True">
StaysOpen="True">
<Border Background="{TemplateBinding Background}"
BorderBrush="{DynamicResource ThemeBorderMidBrush}"
BorderThickness="{TemplateBinding BorderThickness}">

Loading…
Cancel
Save