NSMenuItem 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
NSMenuItem()
NSMenuItem(NSCoder)
[Foundation.Export("initWithCoder:")]
[ObjCRuntime.DesignatedInitializer]
public NSMenuItem (Foundation.NSCoder coder);
new AppKit.NSMenuItem : Foundation.NSCoder -> AppKit.NSMenuItem
參數
- coder
- NSCoder
- 屬性
適用於
NSMenuItem(NSObjectFlag)
protected NSMenuItem (Foundation.NSObjectFlag t);
new AppKit.NSMenuItem : Foundation.NSObjectFlag -> AppKit.NSMenuItem
參數
適用於
NSMenuItem(IntPtr)
protected internal NSMenuItem (IntPtr handle);
new AppKit.NSMenuItem : nativeint -> AppKit.NSMenuItem
參數
- handle
-
IntPtr
nativeint
適用於
NSMenuItem(String)
public NSMenuItem (string title);
new AppKit.NSMenuItem : string -> AppKit.NSMenuItem
參數
- title
- String
適用於
NSMenuItem(String, EventHandler)
public NSMenuItem (string title, EventHandler handler);
new AppKit.NSMenuItem : string * EventHandler -> AppKit.NSMenuItem
參數
- title
- String
- handler
- EventHandler
適用於
NSMenuItem(String, String)
NSMenuItem(String, Selector, String)
[Foundation.Export("initWithTitle:action:keyEquivalent:")]
[ObjCRuntime.DesignatedInitializer]
public NSMenuItem (string title, ObjCRuntime.Selector selectorAction, string charCode);
new AppKit.NSMenuItem : string * ObjCRuntime.Selector * string -> AppKit.NSMenuItem
參數
- title
- String
- selectorAction
- Selector
- charCode
- String
- 屬性
適用於
NSMenuItem(String, String, EventHandler)
public NSMenuItem (string title, string charCode, EventHandler handler);
new AppKit.NSMenuItem : string * string * EventHandler -> AppKit.NSMenuItem
參數
- title
- String
- charCode
- String
- handler
- EventHandler
適用於
NSMenuItem(String, String, EventHandler, Func<NSMenuItem,Boolean>)
public NSMenuItem (string title, string charCode, EventHandler handler, Func<AppKit.NSMenuItem,bool> validator);
new AppKit.NSMenuItem : string * string * EventHandler * Func<AppKit.NSMenuItem, bool> -> AppKit.NSMenuItem
參數
- title
- String
- charCode
- String
- handler
- EventHandler
- validator
- Func<NSMenuItem,Boolean>