+

Search Tips | Advanced Search

Skip navigation links

Index Overview

PREV CLASS NEXT CLASS FRAMES (opens in new window)



Class WL.OptionsMenu

WL.OptionsMenu



Method Summary
Method Attributes Method Name and Description
 

addItem(id, callbackFunction, title, options)

Adds an item to the options menu or application bar.

 

getItem(id)

Returns an item.

 

init(options)

Initializes and enables the options menu or application bar.

 

isEnabled(callback)

Check whether the options menu or application bar is enabled.

 

removeItem(id)

Remove an item from the options menu or application bar.

 

removeItems()

Removes all items from the options menu or application bar.

 

setEnabled(Mandatory)

Enable or disable the options menu or application bar.

 

setOpacity(number)

Sets the opacity of the Windows Phone 8 application bar.

 

setVisible(number)

Make the options menu or application bar visible or invisible.

Method Detail

addItem

addItem(id, callbackFunction, title, options)

Adds an item to the options menu or application bar. Adds an item to the options menu or application bar. Can be called only after the menu is initialized. Items are placed in the menu in the order in which they are added. If you add an item with an existing ID, the new item replaces the existing one.


getItem

getItem(id)

Returns an item. Returns the item with the specified ID. We can use


isEnabled

isEnabled(callback)

Check whether the options menu or application bar is enabled. Returns whether the options menu or application bar is enabled. Can be called only after the menu is initialized.

    Parameters:
    callback - a callback method that accepts the state enabled as a parameter.


removeItem

removeItem(id)

Remove an item from the options menu or application bar. Removes the item with the indicated ID from the options menu or application bar. Can be called only after the menu is initialized.
If no item is found with the specified ID, nothing happens.

    Parameters:
    id - Mandatory string. Identifies the item to be removed.


removeItems

removeItems()

Removes all items from the options menu or application bar. Removes all items from the options menu or application bar. Can be called only after the menu is initialized.


setEnabled

setEnabled(Mandatory)

Enable or disable the options menu or application bar. This method enables or disables the options menu or application bar. When the menu or bar is disabled, it might still be visible, but all its items are disabled. The function disables all the items but does not change the enabled state of each Item.


setOpacity

setOpacity(number)

Sets the opacity of the Windows Phone 8 application bar. Sets the value for the application bar opacity.


setVisible

setVisible(number)

Make the options menu or application bar visible or invisible. Determines whether the options menu or application bar is visible. Can be called only after the options menu is initialized.


© Copyright IBM Corp. 2011, 2016.