|
@@ -2,6 +2,7 @@ using System;
|
|
|
using System.ComponentModel;
|
|
using System.ComponentModel;
|
|
|
using System.Linq;
|
|
using System.Linq;
|
|
|
using System.Reactive.Linq;
|
|
using System.Reactive.Linq;
|
|
|
|
|
+using Avalonia.Controls.Generators;
|
|
|
using Avalonia.Controls.Platform;
|
|
using Avalonia.Controls.Platform;
|
|
|
using Avalonia.Controls.Primitives;
|
|
using Avalonia.Controls.Primitives;
|
|
|
using Avalonia.Controls.Templates;
|
|
using Avalonia.Controls.Templates;
|
|
@@ -121,6 +122,11 @@ namespace Avalonia.Controls
|
|
|
IsOpen = false;
|
|
IsOpen = false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ protected override IItemContainerGenerator CreateItemContainerGenerator()
|
|
|
|
|
+ {
|
|
|
|
|
+ return new MenuItemContainerGenerator(this);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
private void PopupClosed(object sender, EventArgs e)
|
|
private void PopupClosed(object sender, EventArgs e)
|
|
|
{
|
|
{
|
|
|
var contextMenu = (sender as Popup)?.Child as ContextMenu;
|
|
var contextMenu = (sender as Popup)?.Child as ContextMenu;
|