The ViewSwitch UI element is part of the ContextualPanel and should be used to navigate between views.
● itemEnabled
Specifies whether the item is enabled or disabled, that is, whether the user can trigger an action by clicking the item in question.
● itemIcon
The itemIcon property can take the following values and is represented by enumeration type WDViewSwitchIcon.
value |
description |
blank |
Invisible placeholder icon to get the right indent if only some view switch items have an icon. |
news |
Icon for news. |
none |
No icon is displayed at the view switch item. |
overview |
Icon for overviews. |
report |
Icon for reports. |
selfService |
Icon for self services. |
work |
Icon for work related views. |
● itemSource
Specifies the item source of the ViewSwitch. You can use this to specify the path to the context node, where you can define the items.
● itemText
Specifies the text for the item.
● itemVisible
Specifies whether the item is visible.
Name |
Interface |
Type |
Initial Value |
Bindable |
itemEnabled |
IWDViewSwitch |
boolean |
true |
bindable |
itemIcon |
IWDViewSwitch |
WDViewSwitchIcon |
none |
bindable |
itemSource |
IWDViewSwitch |
Object |
|
bindable_mandatory |
itemText |
IWDViewSwitch |
String |
|
bindable |
itemVisible |
IWDViewSwitch |
boolean |
true |
bindable |
● onSelect (int index)
The onSelect event is triggered if the user selects a ViewSwitch item. The event parameter is the zero-based index of the selected item.
...
1. To bind the data of the ViewSwitch, create a context node and the following attributes:
2. Bind the property itemSource to the context node and bind the properties itemEnabled, itemText and itemVisible to the corresponding context attributes.
3. To create and add itemSource elements, add the following source code to the wdDoInit method:
wdDoInit() |
|
1
2
|
for(int i =0; i<3; i++) {
IPrivatePatternUIElementsView.IItemSourceElement ivse = |
In this example, the ViewSwitch would look like the screenshot below: