C# Класс Open.Core.Controls.Buttons.ButtonView

Base class for buttons.
Наследование: ViewBase, IButtonView
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
AllStates ButtonState[]
DownAndPressed ButtonState[]
NotDownOrPressed ButtonState[]

Защищенные свойства (Protected)

Свойство Тип Описание
clickMask jQueryObject

Открытые методы

Метод Описание
CssForState ( int layer, ButtonState state, string cssClasses, EnabledCondition enabledCondition, FocusCondition focusCondition ) : void

Sets the CSS class(es) to use for a given layer.

CssForStates ( int layer, ButtonState states, string cssClasses, EnabledCondition enabledCondition, FocusCondition focusCondition ) : void

Sets the CSS class(es) to use for a given layer.

TemplateForState ( int layer, ButtonState state, string templateSelector, EnabledCondition enabledCondition, FocusCondition focusCondition ) : void

Creates a Template with the specified selector and adds it as content for the given state.

TemplateForStates ( int layer, ButtonState states, string templateSelector, EnabledCondition enabledCondition, FocusCondition focusCondition ) : void

Creates a Template with the specified selector and adds it as content for the given state.

UpdateLayout ( ) : void

Updates the visual state of the button.

Защищенные методы

Метод Описание
AddRequiredTemplate ( string selector, string url ) : void

Adds a template to the list of resoures to download (if it's not already available in the page).

Aftering adding one or more Templates Url's call the 'DownloadTemplates' method.

ButtonView ( IButton model, jQueryObject container ) : System

Constructor.

ButtonView ( IButton model, jQueryObject container, jQueryObject clickMask ) : System

Constructor.

ClearContent ( ) : void

Clears all CSS and Template content which has been added to the button.

CreateAndAppendContainer ( string cssClass ) : jQueryObject
DownloadTemplates ( System.Action onComplete ) : void

Downloads the set of required templates that were added via the 'AddRequiredTemplate' method.

OnDisposed ( ) : void

Destructor.

OnRendered ( ) : void

Invoked immediately after the button has rendered it's state.

OnRendering ( ) : void

Invoked immediately before the button has rendered it's state.

OnUpdateLayout ( ) : void

Implement layout logic in deriving classes.

SyncDimension ( SizeDimension dimension ) : void

Syncs the specified of the button with the model (if it has size values. See 'NoSize' constant).

SyncSize ( ) : void

Syncs the size of the button with the model (if it has size values. See 'NoSize' constant).

Приватные методы

Метод Описание
ButtonView ( ) : System
ButtonView ( IButton model ) : System
CreateContainer ( string cssClass ) : jQueryObject
CssForState ( int layer, ButtonState state, string cssClasses ) : void
CssForStates ( int layer, ButtonState states, string cssClasses ) : void
FireStateChanged ( ) : void
InitContainer ( jQueryObject container ) : jQueryObject
OnEventControllerPropertyChanged ( object sender, PropertyChangedEventArgs e ) : void
OnKeyPress ( int keyCode ) : void
OnLayoutInvalidated ( object sender, EventArgs e ) : void
OnModelPropertyChanged ( object sender, PropertyChangedEventArgs e ) : void
SyncCanFocus ( ) : void
TemplateForState ( int layer, ButtonState state, string templateSelector ) : void
TemplateForStates ( int layer, ButtonState states, string templateSelector ) : void

Описание методов

AddRequiredTemplate() защищенный Метод

Adds a template to the list of resoures to download (if it's not already available in the page).
Aftering adding one or more Templates Url's call the 'DownloadTemplates' method.
protected AddRequiredTemplate ( string selector, string url ) : void
selector string The CSS selector for the template.
url string The URL to download the template(s) from.
Результат void

ButtonView() защищенный Метод

Constructor.
protected ButtonView ( IButton model, jQueryObject container ) : System
model IButton The logical model of the button
container jQueryObject The HTML container of the button.
Результат System

ButtonView() защищенный Метод

Constructor.
protected ButtonView ( IButton model, jQueryObject container, jQueryObject clickMask ) : System
model IButton The logical model of the button
container jQueryObject The HTML container of the button.
clickMask jQueryObject The element used catch mouse events.
Результат System

ClearContent() защищенный Метод

Clears all CSS and Template content which has been added to the button.
protected ClearContent ( ) : void
Результат void

CreateAndAppendContainer() защищенный Метод

protected CreateAndAppendContainer ( string cssClass ) : jQueryObject
cssClass string
Результат jQueryObject

CssForState() публичный Метод

Sets the CSS class(es) to use for a given layer.
public CssForState ( int layer, ButtonState state, string cssClasses, EnabledCondition enabledCondition, FocusCondition focusCondition ) : void
layer int The layer the state is rendered on (0 lowest, higher values fall in front of lower values)
state ButtonState The state the CSS classes apply to.
cssClasses string A string containing one or more CSS class names.
enabledCondition EnabledCondition The enabled-related conditions for which button content applies.
focusCondition FocusCondition The focus-related conditions for which button content applies.
Результат void

CssForStates() публичный Метод

Sets the CSS class(es) to use for a given layer.
public CssForStates ( int layer, ButtonState states, string cssClasses, EnabledCondition enabledCondition, FocusCondition focusCondition ) : void
layer int The layer the state is rendered on (0 lowest, higher values fall in front of lower values)
states ButtonState The state(s) the CSS classes apply to.
cssClasses string A string containing one or more CSS class names.
enabledCondition EnabledCondition The enabled-related conditions for which button content applies.
focusCondition FocusCondition The focus-related conditions for which button content applies.
Результат void

DownloadTemplates() защищенный Метод

Downloads the set of required templates that were added via the 'AddRequiredTemplate' method.
protected DownloadTemplates ( System.Action onComplete ) : void
onComplete System.Action Action which is invoked when the templates have completed downloading.
Результат void

OnDisposed() защищенный Метод

Destructor.
protected OnDisposed ( ) : void
Результат void

OnRendered() защищенный Метод

Invoked immediately after the button has rendered it's state.
protected OnRendered ( ) : void
Результат void

OnRendering() защищенный Метод

Invoked immediately before the button has rendered it's state.
protected OnRendering ( ) : void
Результат void

OnUpdateLayout() защищенный Метод

Implement layout logic in deriving classes.
protected OnUpdateLayout ( ) : void
Результат void

SyncDimension() защищенный Метод

Syncs the specified of the button with the model (if it has size values. See 'NoSize' constant).
protected SyncDimension ( SizeDimension dimension ) : void
dimension SizeDimension The size dimension to sync.
Результат void

SyncSize() защищенный Метод

Syncs the size of the button with the model (if it has size values. See 'NoSize' constant).
protected SyncSize ( ) : void
Результат void

TemplateForState() публичный Метод

Creates a Template with the specified selector and adds it as content for the given state.
public TemplateForState ( int layer, ButtonState state, string templateSelector, EnabledCondition enabledCondition, FocusCondition focusCondition ) : void
layer int The layer the state is rendered on (0 lowest, higher values fall in front of lower values)
state ButtonState The state the template applies to.
templateSelector string The CSS selector where the template can be found.
enabledCondition EnabledCondition The enabled-related conditions for which button content applies.
focusCondition FocusCondition The focus-related conditions for which button content applies.
Результат void

TemplateForStates() публичный Метод

Creates a Template with the specified selector and adds it as content for the given state.
public TemplateForStates ( int layer, ButtonState states, string templateSelector, EnabledCondition enabledCondition, FocusCondition focusCondition ) : void
layer int The layer the state is rendered on (0 lowest, higher values fall in front of lower values)
states ButtonState The states the template applies to.
templateSelector string The CSS selector where the template can be found.
enabledCondition EnabledCondition The enabled-related conditions for which button content applies.
focusCondition FocusCondition The focus-related conditions for which button content applies.
Результат void

UpdateLayout() публичный Метод

Updates the visual state of the button.
public UpdateLayout ( ) : void
Результат void

Описание свойств

AllStates публичное статическое свойство

public static ButtonState[] AllStates
Результат ButtonState[]

DownAndPressed публичное статическое свойство

public static ButtonState[] DownAndPressed
Результат ButtonState[]

NotDownOrPressed публичное статическое свойство

public static ButtonState[] NotDownOrPressed
Результат ButtonState[]

clickMask защищенное свойство

protected jQueryObject clickMask
Результат jQueryObject