ActionComponents  04.05.00
Customizable UI and time-saving tools for Android development with Xamarin and Visual Studio.
ActionComponents.ACNavBarButton Class Reference

Defines a button that can be added to a ActionComponents.ACNavBar of a given ActionComponents.ACNavBarButtonType and ActionComponents.ACNavBarButtonState. Three ActionComponents.ACNavBarButtonAppearance properties controll the look and feel of the button when it is Enabled, Disabled or Selected. More...

Inheritance diagram for ActionComponents.ACNavBarButton:
Collaboration diagram for ActionComponents.ACNavBarButton:

Public Member Functions

 ACNavBarButton (Context context)
 Initializes a new instance of the ActionComponents.ACNavBarButton class. More...
 
 ACNavBarButton (Context context, Display display)
 Initializes a new instance of the ActionComponents.ACNavBarButton class. More...
 
 ACNavBarButton (Context context, IAttributeSet attrs)
 Initializes a new instance of the ActionComponents.ACNavBarButton class. More...
 
 ACNavBarButton (Context context, int image, bool enabled, bool hidden)
 Initializes a new instance of the ActionComponents.ACNavBarButton class. More...
 
 ACNavBarButton (Context context, int image, bool enabled, bool hidden, object tag)
 Initializes a new instance of the ActionComponents.ACNavBarButton class. More...
 
 ACNavBarButton (Context context, ACNavBarButtonAppearance appearanceEnabled, ACNavBarButtonAppearance appearanceDisabled, ACNavBarButtonAppearance appearanceSelected)
 Initializes a new instance of the ActionComponents.ACNavBarButton class. More...
 
 ACNavBarButton (Context context, ACNavBarButtonType type, ACNavBarButtonAppearance appearanceEnabled, ACNavBarButtonAppearance appearanceDisabled, ACNavBarButtonAppearance appearanceSelected, bool enabled, bool hidden, object tag)
 Initializes a new instance of the ActionComponents.ACNavBarButton class. More...
 
void Redraw ()
 Causes the ActionComponents.ACNavBarButton to redraw it's contents totally by dumping it's image cache and doing a total refresh More...
 
delegate void TouchedDelegate (ACNavBarButton responder)
 Occurs when touched. More...
 
delegate void RequestNewViewDelegate (ACNavBarButton responder)
 Occurs when the ActionComponents.ACNavBarButton is of ActionComponents.ACNavBarButtonType View or AutoDisposingView, the button has been selected and no view is attached. More...
 
delegate void ViewHiddenDelegate (ACNavBarButton responder)
 Occurs when this ActionComponents.ACNavBarButton is of ActionComponents.ACNavBarButtonType View and the button has been unselected and the view under its control has been hidden More...
 
delegate void ViewDisposedDelegate (ACNavBarButton responder)
 Occurs when this ActionComponents.ACNavBarButton is of ActionComponents.ACNavBarButtonType AutoDisposingView and the button has been unselected and the view under its control has been removed from memory More...
 

Public Attributes

object tag
 [OPTIONAL] tag object that can be assigned to this ActionComponents.ACNavBarButton for reference More...
 
ACNavBarButtonAppearance appearanceEnabled
 Controls the appearance of the ActionComponents.ACNavBarButton when it is in the Enabled state More...
 
ACNavBarButtonAppearance appearanceDisabled
 Controls the appearance of the ActionComponents.ACNavBarButton when it is in the Disabled state More...
 
ACNavBarButtonAppearance appearanceSelected
 Controls the appearance of the ActionComponents.ACNavBarButton when it is in the Selected state More...
 

Protected Member Functions

override void OnMeasure (int widthMeasureSpec, int heightMeasureSpec)
 Raises the measure event. More...
 
override void OnDraw (Canvas canvas)
 Raises the draw event. More...
 

Properties

ACNavBarButtonState state [get]
 Gets the current state of the button More...
 
ACNavBarButtonType type [get]
 Returns the type of this ActionComponents.ACNavBarButton More...
 
ACNavBar NavBar [get]
 Returns the ActionComponents.ACNavBar containing this ActionComponents.ACNavBar.ACNavBarButton More...
 
View attachedView [get, set]
 Gets or sets the UIView being controlled by this ActionComponents.ACNavBarButton More...
 
override bool Enabled [get, set]
 Gets or sets a value indicating whether this ActionComponents.ACNavBarButton is enabled. More...
 
bool Hidden [get, set]
 Gets or sets a value indicating whether this ActionComponents.ACNavBarButton is hidden. More...
 
RelativeLayout.LayoutParams layoutParams [get]
 Gets the layout parameters typecast to a RelativeLayout.LayoutParams format More...
 
int LeftMargin [get, set]
 Gets or sets the left margin. More...
 
int TopMargin [get, set]
 Gets or sets the top margin. More...
 
int RightMargin [get, set]
 Gets or sets the right margin. More...
 
int BottomMargin [get, set]
 Gets or sets the bottom margin. More...
 
int LayoutWidth [get, set]
 Gets or sets the width of the layout. More...
 
int LayoutHeight [get, set]
 Gets or sets the height of the layout. More...
 

Events

TouchedDelegate Touched
 Occurs when touched. More...
 
RequestNewViewDelegate RequestNewView
 Occurs when the ActionComponents.ACNavBarButton is of ActionComponents.ACNavBarButtonType View or AutoDisposingView, the button has been selected and no view is attached. More...
 
ViewHiddenDelegate ViewHidden
 Occurs when this ActionComponents.ACNavBarButton is of ActionComponents.ACNavBarButtonType View and the button has been unselected and the view under its control has been hidden More...
 
ViewDisposedDelegate ViewDisposed
 Occurs when this ActionComponents.ACNavBarButton is of ActionComponents.ACNavBarButtonType AutoDisposingView and the button has been unselected and the view under its control has been removed from memory More...
 

Detailed Description

Defines a button that can be added to a ActionComponents.ACNavBar of a given ActionComponents.ACNavBarButtonType and ActionComponents.ACNavBarButtonState. Three ActionComponents.ACNavBarButtonAppearance properties controll the look and feel of the button when it is Enabled, Disabled or Selected.

ActionComponents.ACNavBarButtons cannot be created directly but are built by methods of the ActionComponents.ACNavBarButtonCollection as AddButton, AddAutoDisposingButton, AddTool or AddNotification

Constructor & Destructor Documentation

ActionComponents.ACNavBarButton.ACNavBarButton ( Context  context)

Initializes a new instance of the ActionComponents.ACNavBarButton class.

Parameters
contextContext.
ActionComponents.ACNavBarButton.ACNavBarButton ( Context  context,
Display  display 
)

Initializes a new instance of the ActionComponents.ACNavBarButton class.

Parameters
contextContext.
displayDisplay.
ActionComponents.ACNavBarButton.ACNavBarButton ( Context  context,
IAttributeSet  attrs 
)

Initializes a new instance of the ActionComponents.ACNavBarButton class.

Parameters
contextContext.
attrsAttrs.
ActionComponents.ACNavBarButton.ACNavBarButton ( Context  context,
int  image,
bool  enabled,
bool  hidden 
)

Initializes a new instance of the ActionComponents.ACNavBarButton class.

Parameters
contextContext.
imageImage.
enabledIf set to true enabled.
hiddenIf set to true hidden.
ActionComponents.ACNavBarButton.ACNavBarButton ( Context  context,
int  image,
bool  enabled,
bool  hidden,
object  tag 
)

Initializes a new instance of the ActionComponents.ACNavBarButton class.

Parameters
contextContext.
imageImage.
enabledIf set to true enabled.
hiddenIf set to true hidden.
tagTag.
ActionComponents.ACNavBarButton.ACNavBarButton ( Context  context,
ACNavBarButtonAppearance  appearanceEnabled,
ACNavBarButtonAppearance  appearanceDisabled,
ACNavBarButtonAppearance  appearanceSelected 
)

Initializes a new instance of the ActionComponents.ACNavBarButton class.

Parameters
contextContext.
appearanceEnabledAppearance enabled.
appearanceDisabledAppearance disabled.
appearanceSelectedAppearance selected.

Here is the call graph for this function:

ActionComponents.ACNavBarButton.ACNavBarButton ( Context  context,
ACNavBarButtonType  type,
ACNavBarButtonAppearance  appearanceEnabled,
ACNavBarButtonAppearance  appearanceDisabled,
ACNavBarButtonAppearance  appearanceSelected,
bool  enabled,
bool  hidden,
object  tag 
)

Initializes a new instance of the ActionComponents.ACNavBarButton class.

Parameters
contextContext.
typeType.
appearanceEnabledAppearance enabled.
appearanceDisabledAppearance disabled.
appearanceSelectedAppearance selected.
enabledIf set to true enabled.
hiddenIf set to true hidden.
tagTag.

Here is the call graph for this function:

Member Function Documentation

override void ActionComponents.ACNavBarButton.OnDraw ( Canvas  canvas)
protected

Raises the draw event.

Parameters
canvasCanvas.

Here is the call graph for this function:

override void ActionComponents.ACNavBarButton.OnMeasure ( int  widthMeasureSpec,
int  heightMeasureSpec 
)
protected

Raises the measure event.

Parameters
widthMeasureSpecWidth measure spec.
heightMeasureSpecHeight measure spec.
void ActionComponents.ACNavBarButton.Redraw ( )

Causes the ActionComponents.ACNavBarButton to redraw it's contents totally by dumping it's image cache and doing a total refresh

WARNING! This routine should be called sparingly as it has a performance hit

Here is the caller graph for this function:

delegate void ActionComponents.ACNavBarButton.RequestNewViewDelegate ( ACNavBarButton  responder)

Occurs when the ActionComponents.ACNavBarButton is of ActionComponents.ACNavBarButtonType View or AutoDisposingView, the button has been selected and no view is attached.

When responding to this request create a new UIView and attach it to the button's view property

delegate void ActionComponents.ACNavBarButton.TouchedDelegate ( ACNavBarButton  responder)

Occurs when touched.

Here is the caller graph for this function:

delegate void ActionComponents.ACNavBarButton.ViewDisposedDelegate ( ACNavBarButton  responder)

Occurs when this ActionComponents.ACNavBarButton is of ActionComponents.ACNavBarButtonType AutoDisposingView and the button has been unselected and the view under its control has been removed from memory

delegate void ActionComponents.ACNavBarButton.ViewHiddenDelegate ( ACNavBarButton  responder)

Occurs when this ActionComponents.ACNavBarButton is of ActionComponents.ACNavBarButtonType View and the button has been unselected and the view under its control has been hidden

Member Data Documentation

ACNavBarButtonAppearance ActionComponents.ACNavBarButton.appearanceDisabled

Controls the appearance of the ActionComponents.ACNavBarButton when it is in the Disabled state

ACNavBarButtonAppearance ActionComponents.ACNavBarButton.appearanceEnabled

Controls the appearance of the ActionComponents.ACNavBarButton when it is in the Enabled state

ACNavBarButtonAppearance ActionComponents.ACNavBarButton.appearanceSelected

Controls the appearance of the ActionComponents.ACNavBarButton when it is in the Selected state

object ActionComponents.ACNavBarButton.tag

[OPTIONAL] tag object that can be assigned to this ActionComponents.ACNavBarButton for reference

Property Documentation

View ActionComponents.ACNavBarButton.attachedView
getset

Gets or sets the UIView being controlled by this ActionComponents.ACNavBarButton

The view.

WARNING! This property should ONLY be set in response to a RequestNewView event on this ActionComponents.ACNavBarButton. Setting the view outside of the event can cause undetermined behavior in the parent ActionComponents.ACNavBar and display issues!

int ActionComponents.ACNavBarButton.BottomMargin
getset

Gets or sets the bottom margin.

The bottom margin.

override bool ActionComponents.ACNavBarButton.Enabled
getset

Gets or sets a value indicating whether this ActionComponents.ACNavBarButton is enabled.

true if enabled; otherwise, false.

WARNING! You cannot disable the currently selected ActionComponents.ACNavBarButton

bool ActionComponents.ACNavBarButton.Hidden
getset

Gets or sets a value indicating whether this ActionComponents.ACNavBarButton is hidden.

true if hidden; otherwise, false.

WARNING! You cannot hide the currently selected ActionComponents.ACNavBarButton

int ActionComponents.ACNavBarButton.LayoutHeight
getset

Gets or sets the height of the layout.

The height of the layout.

RelativeLayout.LayoutParams ActionComponents.ACNavBarButton.layoutParams
get

Gets the layout parameters typecast to a RelativeLayout.LayoutParams format

The layout parameters.

int ActionComponents.ACNavBarButton.LayoutWidth
getset

Gets or sets the width of the layout.

The width of the layout.

int ActionComponents.ACNavBarButton.LeftMargin
getset

Gets or sets the left margin.

The left margin.

ACNavBar ActionComponents.ACNavBarButton.NavBar
get

Returns the ActionComponents.ACNavBar containing this ActionComponents.ACNavBar.ACNavBarButton

The nav bar.

int ActionComponents.ACNavBarButton.RightMargin
getset

Gets or sets the right margin.

The right margin.

ACNavBarButtonState ActionComponents.ACNavBarButton.state
get

Gets the current state of the button

The button's state

You cannot set a button's state directly, it's set in response to events in the parent ActionComponents.ACNavBar

int ActionComponents.ACNavBarButton.TopMargin
getset

Gets or sets the top margin.

The top margin.

ACNavBarButtonType ActionComponents.ACNavBarButton.type
get

Returns the type of this ActionComponents.ACNavBarButton

The ActionComponents.ACNavBarButtonType type

You cannot set a button's type directly, it's set based on which method of the ActionComponents.ACNavBarButtonCollection was used to create it: AddButton, AddAutoDisposingButton, AddTool or AddNotification

Event Documentation

RequestNewViewDelegate ActionComponents.ACNavBarButton.RequestNewView

Occurs when the ActionComponents.ACNavBarButton is of ActionComponents.ACNavBarButtonType View or AutoDisposingView, the button has been selected and no view is attached.

When responding to this request create a new UIView and attach it to the button's view property

TouchedDelegate ActionComponents.ACNavBarButton.Touched

Occurs when touched.

ViewDisposedDelegate ActionComponents.ACNavBarButton.ViewDisposed

Occurs when this ActionComponents.ACNavBarButton is of ActionComponents.ACNavBarButtonType AutoDisposingView and the button has been unselected and the view under its control has been removed from memory

ViewHiddenDelegate ActionComponents.ACNavBarButton.ViewHidden

Occurs when this ActionComponents.ACNavBarButton is of ActionComponents.ACNavBarButtonType View and the button has been unselected and the view under its control has been hidden