Class Menu

Definition

Namespace:
Tizen.NUI.Components
Assembly:
Tizen.NUI.Components.dll
API Level:
9

Menu is a class which contains a set of MenuItems and has one of them selected.

C#
Copy
public class Menu : Control, IDynamicResourceHandler, IElement, INameScope, IElementController, System.IDisposable, IResourcesProvider
Inheritance
Implements

Constructors

View Source

Menu()

Creates a new instance of Menu.

Declaration
C#
Copy
public Menu()
API Level: 9
View Source

Menu(String)

Creates a new instance of Menu.

Declaration
C#
Copy
public Menu(string style)
Parameters
Type Name Description
String style

Creates Menu by special style defined in UX.

View Source

Menu(MenuStyle)

Creates a new instance of a Menu with style.

Declaration
C#
Copy
public Menu(MenuStyle style)
Parameters
Type Name Description
MenuStyle style

A style applied to the newly created Menu.

Fields

View Source

AnchorProperty

AnchorProperty

Declaration
C#
Copy
public static readonly BindableProperty AnchorProperty
Field Value
Type Description
BindableProperty
View Source

HorizontalPositionToAnchorProperty

HorizontalPositionToAnchorProperty

Declaration
C#
Copy
public static readonly BindableProperty HorizontalPositionToAnchorProperty
Field Value
Type Description
BindableProperty
View Source

VerticalPositionToAnchorProperty

VerticalPositionToAnchorProperty

Declaration
C#
Copy
public static readonly BindableProperty VerticalPositionToAnchorProperty
Field Value
Type Description
BindableProperty

Properties

View Source

Anchor

Anchor of Menu. Menu is displayed at the anchor's position. If there is not enough space to display menu at the anchor's position, then menu is displayed at the proper position near anchor's position.

Declaration
C#
Copy
public View Anchor { get; set; }
Property Value
Type Description
View
API Level: 9
View Source

Content

Content of Menu.

Declaration
C#
Copy
protected View Content { get; set; }
Property Value
Type Description
View
View Source

HorizontalPositionToAnchor

The horizontal position of Menu relative to Anchor. If Anchor is not set, then RelativePosition does not work. If RelativePosition is Start, then Menu is displayed at the start of Anchor. If RelativePosition is Center, then Menu is displayed at the center of Anchor. If RelativePosition is End, then Menu is displayed at the end of Anchor. If there is not enough space to display menu at the anchor's position, then menu is displayed at the proper position near anchor's position.

Declaration
C#
Copy
public Menu.RelativePosition HorizontalPositionToAnchor { get; set; }
Property Value
Type Description
Menu.RelativePosition
API Level: 9
View Source

Items

Menu items in Menu. Menu items are not automatically disposed when Menu is disposed. Therefore, please dispose Menu items when you dispose Menu.

Declaration
C#
Copy
public IEnumerable<MenuItem> Items { get; set; }
Property Value
Type Description
IEnumerable<MenuItem>
API Level: 9
View Source

Scrim

Scrim of Menu. Scrim is the screen region outside Menu. If Scrim is touched, then Menu is dismissed.

Declaration
C#
Copy
protected View Scrim { get; set; }
Property Value
Type Description
View
View Source

VerticalPositionToAnchor

The vertical position of Menu relative to Anchor. If Anchor is not set, then RelativePosition does not work. If RelativePosition is Start, then Menu is displayed at the start of Anchor. If RelativePosition is Center, then Menu is displayed at the center of Anchor. If RelativePosition is End, then Menu is displayed at the end of Anchor. If there is not enough space to display menu at the anchor's position, then menu is displayed at the proper position near anchor's position.

Declaration
C#
Copy
public Menu.RelativePosition VerticalPositionToAnchor { get; set; }
Property Value
Type Description
Menu.RelativePosition
API Level: 9

Methods

View Source

AccessibilityCalculateStates()

Informs AT-SPI bridge about the set of AT-SPI states associated with this object.

Declaration
C#
Copy
protected override AccessibilityStates AccessibilityCalculateStates()
Returns
Type Description
AccessibilityStates
Overrides
View Source

ApplyStyle(ViewStyle)

Applies style to MenuItem.

Declaration
C#
Copy
public override void ApplyStyle(ViewStyle viewStyle)
Parameters
Type Name Description
ViewStyle viewStyle

The style to apply.

Overrides
View Source

CreateViewStyle()

Gets Menu style.

Declaration
C#
Copy
protected override ViewStyle CreateViewStyle()
Returns
Type Description
ViewStyle

The default Menu style.

Overrides
View Source

Dismiss()

Dismiss the Menu. The Menu becomes hidden and disposed.

Declaration
C#
Copy
public void Dismiss()
API Level: 9
View Source

Dispose(DisposeTypes)

Dispose Control and all children on it.

Declaration
C#
Copy
protected override void Dispose(DisposeTypes type)
Parameters
Type Name Description
DisposeTypes type

Dispose type.

Overrides
View Source

OnInitialize()

Initialize AT-SPI object.

Declaration
C#
Copy
public override void OnInitialize()
Overrides
View Source

OnRelayout(Vector2, RelayoutContainer)

Called after the size negotiation has been finished for this control.
The control is expected to assign this given size to itself or its children.
Should be overridden by derived classes if they need to layout views differently after certain operations like add or remove views, resize, or after changing specific properties.
As this function is called from inside the size negotiation algorithm, you cannot call RequestRelayout (the call would just be ignored).

Declaration
C#
Copy
public override void OnRelayout(Vector2 size, RelayoutContainer container)
Parameters
Type Name Description
Vector2 size

The allocated size.

RelayoutContainer container

The control should add views to this container that it is not able to allocate a size for.

Overrides
View Source

Post(Window)

Post the Menu. The Menu is displayed.

Declaration
C#
Copy
public void Post(Window window = null)
Parameters
Type Name Description
Window window

The Window where Menu is displayed.

API Level: 9

Implements

Extension Methods