Browse Source

Merge branch 'master' into update/samples-tests-net6

pull/6915/head
Jumar Macato 5 years ago
committed by GitHub
parent
commit
ea491b91dd
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/Avalonia.Controls/MenuItem.cs
  2. 4
      src/Avalonia.Controls/Platform/PlatformManager.cs

2
src/Avalonia.Controls/MenuItem.cs

@ -387,7 +387,7 @@ namespace Avalonia.Controls
parent = parent.Parent; parent = parent.Parent;
} }
_isEmbeddedInMenu = parent is IMenu; _isEmbeddedInMenu = parent.FindLogicalAncestorOfType<IMenu>(true) != null;
} }
protected override void OnDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs e) protected override void OnDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs e)

4
src/Avalonia.Controls/Platform/PlatformManager.cs

@ -29,7 +29,7 @@ namespace Avalonia.Controls.Platform
if (platform == null) if (platform == null)
{ {
throw new Exception("Could not CreateWindow(): IWindowingPlatform is not registered."); throw new Exception("Could not CreateTrayIcon(): IWindowingPlatform is not registered.");
} }
return s_designerMode ? null : platform.CreateTrayIcon(); return s_designerMode ? null : platform.CreateTrayIcon();
@ -45,7 +45,7 @@ namespace Avalonia.Controls.Platform
throw new Exception("Could not CreateWindow(): IWindowingPlatform is not registered."); throw new Exception("Could not CreateWindow(): IWindowingPlatform is not registered.");
} }
return s_designerMode ? (IWindowImpl)platform.CreateEmbeddableWindow() : platform.CreateWindow(); return s_designerMode ? platform.CreateEmbeddableWindow() : platform.CreateWindow();
} }
public static IWindowImpl CreateEmbeddableWindow() public static IWindowImpl CreateEmbeddableWindow()

Loading…
Cancel
Save