NativeMenu Class
Definition
public class NativeMenu
Constructors
| Name | Description |
|---|---|
| NativeMenu | No summary available. |
NativeMenu Constructor
public NativeMenu()
Methods
| Name | Description |
|---|---|
| Add | No summary available. |
| GetEnumerator | No summary available. |
| GetIsNativeMenuExported | No summary available. |
| GetMenu | No summary available. |
| SetMenu | No summary available. |
| Bind (8 overloads) | Binds a Avalonia.AvaloniaProperty to an Avalonia.Data.BindingBase. Inherited from AvaloniaObject. |
| CheckAccess | Returns a value indicating whether the current thread is the UI thread. Inherited from AvaloniaObject. |
| ClearValue (4 overloads) | Clears a Avalonia.AvaloniaProperty's local value. Inherited from AvaloniaObject. |
| CoerceValue | Coerces the specified Avalonia.AvaloniaProperty. Inherited from AvaloniaObject. |
| Equals | Compares two objects using reference equality. Inherited from AvaloniaObject. |
| GetBaseValue | Inherited from AvaloniaObject. |
| GetHashCode | Gets the hash code for the object. Inherited from AvaloniaObject. |
| GetValue (3 overloads) | Gets a Avalonia.AvaloniaProperty value. Inherited from AvaloniaObject. |
| IsAnimating | Checks whether a Avalonia.AvaloniaProperty is animating. Inherited from AvaloniaObject. |
| IsSet | Checks whether a Avalonia.AvaloniaProperty is set on this object. Inherited from AvaloniaObject. |
| SetCurrentValue (2 overloads) | Sets the value of a dependency property without changing its value source. Inherited from AvaloniaObject. |
| SetValue (3 overloads) | Sets a Avalonia.AvaloniaProperty value. Inherited from AvaloniaObject. |
| VerifyAccess | Checks that the current thread is the UI thread and throws if not. Inherited from AvaloniaObject. |
Add Method
public void Add(Avalonia.Controls.NativeMenuItemBase item)
Parameters
GetEnumerator Method
public System.Collections.Generic.IEnumerator<Avalonia.Controls.NativeMenuItemBase> GetEnumerator()
Returns
System.Collections.Generic.IEnumerator<Avalonia.Controls.NativeMenuItemBase>
GetIsNativeMenuExported Method
public bool GetIsNativeMenuExported(Avalonia.Controls.TopLevel tl)
Parameters
Returns
bool
GetMenu Method
public Avalonia.Controls.NativeMenu GetMenu(Avalonia.AvaloniaObject o)
Parameters
Returns
SetMenu Method
public void SetMenu(Avalonia.AvaloniaObject o, Avalonia.Controls.NativeMenu menu)
Parameters
Properties
| Name | Description |
|---|---|
| Items | No summary available. |
| Parent | No summary available. |
| Dispatcher | Returns the Avalonia.AvaloniaObject.Dispatcher that this Avalonia.AvaloniaObject is associated with. Inherited from AvaloniaObject. |
| Item | Inherited from AvaloniaObject. |
Items Property
public System.Collections.Generic.IList<Avalonia.Controls.NativeMenuItemBase> Items { get; set; }
Parent Property
public Avalonia.Controls.NativeMenuItem Parent { get; set; }
Fields
| Name | Description |
|---|---|
| IsNativeMenuExportedProperty | No summary available. |
| MenuProperty | No summary available. |
| ParentProperty | No summary available. |
IsNativeMenuExportedProperty Field
public Avalonia.AttachedProperty<bool> IsNativeMenuExportedProperty
MenuProperty Field
public Avalonia.AttachedProperty<Avalonia.Controls.NativeMenu> MenuProperty
ParentProperty Field
public Avalonia.DirectProperty<Avalonia.Controls.NativeMenu, Avalonia.Controls.NativeMenuItem> ParentProperty
Events
| Name | Description |
|---|---|
| Closed | Raised after the menu is closed. |
| NeedsUpdate | Raised when the menu requests an update. |
| Opening | Raised before the menu is opened. |
| PropertyChanged | Raised when a Avalonia.AvaloniaProperty value changes on this object. Inherited from AvaloniaObject. |
Closed Event
Raised after the menu is closed.
public event EventHandler<EventArgs> Closed
Remarks
Do not update the menu in this event; use Avalonia.Controls.NativeMenu.NeedsUpdate.
NeedsUpdate Event
Raised when the menu requests an update.
public event EventHandler<EventArgs> NeedsUpdate
Remarks
Use this event to add, remove or modify menu items before a menu is shown or a hotkey is pressed.
Opening Event
Raised before the menu is opened.
public event EventHandler<EventArgs> Opening
Remarks
Do not update the menu in this event; use Avalonia.Controls.NativeMenu.NeedsUpdate.