瀏覽代碼

Merge pull request #4973 from pr8x/hotfix-ctx-menu2

Throw NotSupportedException inside ContextMenu.Open(null)
Dan Walmsley 5 年之前
父節點
當前提交
c575283ae3
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Avalonia.Controls/ContextMenu.cs

+ 1 - 1
src/Avalonia.Controls/ContextMenu.cs

@@ -236,7 +236,7 @@ namespace Avalonia.Controls
         /// <summary>
         /// Opens the menu.
         /// </summary>
-        public override void Open() => Open(null);
+        public override void Open() => throw new NotSupportedException();
 
         /// <summary>
         /// Opens a context menu on the specified control.