Class Menu
Definition
- Namespace:
- Tizen.NUI.Components
- Assembly:
- Tizen.NUI.Components.dll
Menu is a class which contains a set of MenuItems and has one of them selected.
public class Menu : Control, IDynamicResourceHandler, INameScope, System.IDisposable, IResourcesProvider
- Inheritance
- Implements
-
System.IDisposable
Constructors
View SourceMenu()
Creates a new instance of Menu.
Declaration
public Menu()
Menu(string)
Creates a new instance of Menu.
Declaration
public Menu(string style)
Parameters
Type | Name | Description |
---|---|---|
string | style | Creates Menu by special style defined in UX. |
Menu(MenuStyle)
Creates a new instance of a Menu with style.
Declaration
public Menu(MenuStyle style)
Parameters
Type | Name | Description |
---|---|---|
MenuStyle | style | A style applied to the newly created Menu. |
Fields
View SourceAnchorProperty
AnchorProperty
Declaration
public static readonly BindableProperty AnchorProperty
Field Value
Type | Description |
---|---|
BindableProperty |
HorizontalPositionToAnchorProperty
HorizontalPositionToAnchorProperty
Declaration
public static readonly BindableProperty HorizontalPositionToAnchorProperty
Field Value
Type | Description |
---|---|
BindableProperty |
VerticalPositionToAnchorProperty
VerticalPositionToAnchorProperty
Declaration
public static readonly BindableProperty VerticalPositionToAnchorProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Properties
View SourceAnchor
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
public View Anchor { get; set; }
Property Value
Type | Description |
---|---|
View |
Content
Content of Menu.
Declaration
protected View Content { get; set; }
Property Value
Type | Description |
---|---|
View |
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
public Menu.RelativePosition HorizontalPositionToAnchor { get; set; }
Property Value
Type | Description |
---|---|
Menu.RelativePosition |
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
public IEnumerable<MenuItem> Items { get; set; }
Property Value
Type | Description |
---|---|
IEnumerable<><MenuItem> |
Scrim
Scrim of Menu. Scrim is the screen region outside Menu. If Scrim is touched, then Menu is dismissed.
Declaration
protected View Scrim { get; set; }
Property Value
Type | Description |
---|---|
View |
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
public Menu.RelativePosition VerticalPositionToAnchor { get; set; }
Property Value
Type | Description |
---|---|
Menu.RelativePosition |
Methods
View SourceAccessibilityCalculateStates()
Informs AT-SPI bridge about the set of AT-SPI states associated with this object.
Declaration
protected override AccessibilityStates AccessibilityCalculateStates()
Returns
Type | Description |
---|---|
AccessibilityStates |
Overrides
View SourceApplyStyle(ViewStyle)
Applies style to MenuItem.
Declaration
public override void ApplyStyle(ViewStyle viewStyle)
Parameters
Type | Name | Description |
---|---|---|
ViewStyle | viewStyle | The style to apply. |
Overrides
View SourceCreateViewStyle()
Gets Menu style.
Declaration
protected override ViewStyle CreateViewStyle()
Returns
Type | Description |
---|---|
ViewStyle | The default Menu style. |
Overrides
View SourceDismiss()
Dismiss the Menu. The Menu becomes hidden and disposed.
Declaration
public void Dismiss()
Dispose(DisposeTypes)
Declaration
protected override void Dispose(DisposeTypes type)
Parameters
Type | Name | Description |
---|---|---|
DisposeTypes | type |
Overrides
View SourceOnInitialize()
Initialize AT-SPI object.
Declaration
public override void OnInitialize()
Overrides
View SourceOnRelayout(Vector2, RelayoutContainer)
Declaration
public override void OnRelayout(Vector2 size, RelayoutContainer container)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | size | |
RelayoutContainer | container |
Overrides
View SourcePost(Window)
Post the Menu. The Menu is displayed.
Declaration
public void Post(Window window = null)
Parameters
Type | Name | Description |
---|---|---|
Window | window | The Window where Menu is displayed. |