Class ContextMenuService
Inheritance
System.Object
ContextMenuService
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Controls
Assembly: OpenSilver.dll
Syntax
public static class ContextMenuService
Fields
| Improve this Doc View SourceContextMenuProperty
The DependencyProperty for the ContextMenu property.
Declaration
public static readonly DependencyProperty ContextMenuProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Methods
| Improve this Doc View SourceGetContextMenu(DependencyObject)
Gets the value of the ContextMenu property on the specified object.
Declaration
public static ContextMenu GetContextMenu(DependencyObject element)
Parameters
Type | Name | Description |
---|---|---|
DependencyObject | element | The object on which to query the ContextMenu property. |
Returns
Type | Description |
---|---|
ContextMenu | The value of the ContextMenu property. |
SetContextMenu(DependencyObject, ContextMenu)
Sets the ContextMenu property on the specified object.
Declaration
public static void SetContextMenu(DependencyObject element, ContextMenu value)
Parameters
Type | Name | Description |
---|---|---|
DependencyObject | element | The object on which to set the ContextMenu property. |
ContextMenu | value | The value of the ContextMenu property. If the value is of type ContextMenu, then that is the ContextMenu that will be used (without any modification). If the value is of any other type, then that value will be used as the content for a ContextMenu provided by this service, and the other attached properties of this service will be used to configure the ContextMenu. |