Skip to main content

WEBfactory 2010

WFStatesToggleButton1

WFStatesToggleButton1 allows the user to toggle between two predefined values that are written to a selected signal. Additionally, it provides visual feedback using states and can display a different icons for each position.

Features

The WFStatesToggleButton1 control shares the following common features of the WEBfactory 2010 controls library:

It also provides the following particular features:

Button icon

The WFStatesToggleButton1 control can display any PNG or JPEG image file as icon, at run time. The icon's position, margin and opacity can be configured at design-time.

Toggling signal writing

The WFStatesToggleButton1 control can be configured to write a predefined value to a predefined signal for it's checked position and a different value for it's unchecked position. The position toggling can be done on a single click (checked position on mouse down and unchecked position on mouse up) or it can have the standard behavior where clicking once toggles the checked position and clicking the second time toggles the unchecked position.

Remote position controlling

The two positions of the toggle button can be controlled by another signal. This signal can toggle between the button's position, thus writing the values corresponding to each position.

Design-time properties

The WFStatesToggleButton1 control shares the following common design-time properties of the WEBfactory 2010 controls library:

It also exposes the following particular properties in 's Property Inspector:

General properties

In Microsoft Blend and Visual Studio, the following properties can be found under the WEBfactory 2010 - Signals category.

  • CheckedSymbolicText - the translatable text displayed in the checked position.

  • IsTipModeEnabled - if enabled, this option allows the user to toggle between the checked and unchecked positions on a single click. On mouse down, the button goes into the checked position, and on mouse up, the button goes back into the unchecked position.

  • UncheckedSymbolicText - the translatable text displayed in the unchecked position.

  • Value1 - the value that will be written to the signal (set at SignalName) when the button is in the checked position.

  • Value2 - the value that will be written to the signal (set at SignalName) when the button is in the unchecked position.

Icons properties

In Microsoft Blend and Visual Studio, the following properties can be found under the WEBfactory 2010 - Icons category.

  • IconImageChecked - the source JPEG or PNG file that will be displayed as icon in the checked position.

  • IconImageUnchecked - the source JPEG or PNG file that will be displayed as icon in the unchecked position.

  • IconMargin - the margins of the icon (in pixels).

  • IconMaxSize - the maximum size of the icon (in pixels). The icon scales depending on the text and margins, but cannot exceed this size.

  • IconOpacity - the opacity of the icon.

  • IconPlacement - the position of the icon in the button. Can be: Center, Left, Top, Right or Bottom.

  • IconStretch - the stretching proportions of the icon. Can be: None, Fill, Uniform or UniformToFill.

Signals properties

In Microsoft Blend and Visual Studio, the following properties can be found under the WEBfactory 2010 - Signals category.

  • StateSignalName - allows the user to select a signal which drives the checked and unchecked positions of the control. The control will activate its checked position when the value of this signal is 0 and its unchecked position when the value of this signal is 1.