This topic provides information about the xamRibbon™ control’s testable user recordable and replay-able methods.
This topic contains the following sections:
This action launches the DialogBoxLauncherTool of a RibbonGroup .
The following table explains the method’s parameter followed by code example.
Clicking the DialogBoxLauncherTool (outlined in the above screenshot) records the following script.
WpfWindow("Window1").XamRibbon("xamRibbon").OpenGroupDialog ARRAY("RibbonGroup", "Format", 0, "DialogBoxLauncherTool")
The following exceptions will result from not being able to locate the DialogBoxLauncherTool :
The oGroupId is null or missing
The index of the ribbon group (if present) is out of range of the total existing ribbon groups
The ribbon group (if present) does not match any of the headers of the existing ribbon groups
The ribbon group is removed, collapsed or hidden
The ribbon group does not have a DialogBoxLauncherTool or the DialogBoxLauncherTool is removed, collapsed or hidden in that group
Clicking on the selected tab of the ribbon identified by its oTabId . Selecting a ContextualTabGroup the first tab in that group is always selected by default and hence recorded as a selection of the first tab (not the ContextualTabGroup ).
The following screenshot illustrates this concept. Selecting the ContextualTabGroup will, by default, record the first RibbonTab in the group instead.
The following table explains the method’s parameter followed by code example.
Clicking the contextual tab called “Selection” (Illustrated in the above screenshot) records the first ribbon tab instead.
WpfWindow("Window1").XamRibbon("xamRibbon").SelectTab "Font Selection"
The following exceptions will result from not being able to locate the tab:
If the oTabId is null or missing
The tab index (if present) is out of range of the total existing tabs
The header (if present) does not match any of the headers of the existing tabs
The tab is removed, collapsed or hidden
This method performs Click, SelectValue, SetValue, Activate, DropDown, CloseUp actions on an IRibbonTool located within an ApplicationMenu, QuickAccessToolbar or a RibbonGroup within the selected tab. DropDown ToolAction is a ReplayOnly action except for the ApplicationMenu and QuickCustomizeMenu drop down. CloseUp is a ReplayOnly action
The following table explains the method’s parameter followed by code example.
Clicking on a ButtonTool with header “Copy” located in RibbonGroup with header “Group1” in a tab with header “Tab1”.
XamRibbon(RibbonName).PerformToolAction
Click, ARRAY("RibbonGroup", "Tab1", "Group1", "Copy")
Clicking on a RadioButtonTool with header “RadioButton” located in RibbonGroup with header “Group1” located in QuickAccessToolbar .
XamRibbon(RibbonName).PerformToolAction
Click, ARRAY("QuickAccessToolbar", "Group1", "RadioButton")
Clicking on a LabelTool with header “Label” located in RibbonGroup with header “Group1” located in ApplicationMenuRecentItems area.
XamRibbon(RibbonName).PerformToolAction
Click, ARRAY("ApplicationMenuRecentItems", "Group1", "Label")
Setting value as “Hello” on a TextEditorTool with header “Text editor” located in RibbonGroup with header “Group2” in a tab with header “Tab1”.
XamRibbon(RibbonName).PerformToolAction
SetValue, ARRAY("RibbonGroup", "Tab1", "Group2", "Text editor"), "Hello”
Setting value as “Hi” on a MaskedEditorTool with header “Masked editor” located in RibbonGroup with header “Group2” in a tab with header “Tab1”.
XamRibbon(RibbonName).PerformToolAction
SetValue, ARRAY("RibbonGroup", "Tab1", "Group2", "Masked editor"), "Hi”
Selecting value “One” from ComboEditorTool with header “Combo editor” located in RibbonGroup with header “Group2” in a tab with header “Tab1”.
XamRibbon(RibbonName).PerformToolAction
SelectValue, ARRAY("RibbonGroup", "Tab1", "Group2", "Combo editor"), "One"
Clicking to activate a GalleryItem with header “GalleryItem1” located in a MenuTool with header “GalleryTool” within a RibbonGroup with header “Group2” in a tab with header “Tab1”.
XamRibbon(RibbonName).PerformToolAction
Activate, ARRAY("RibbonGroup", "Tab1", "Group2", “GalleryTool”, "GalleryItem1")
Selecting a tool from GalleryItem with header “GalleryItem1” located in a MenuTool with header “GalleryTool” within a RibbonGroup with header “Group2” in a tab with header “Tab1”.
XamRibbon(RibbonName).PerformToolAction
SelectValue, ARRAY("RibbonGroup", "Tab1", "Group2", “GalleryTool”, "GalleryItem1")
Clicking on a GalleryItem with header “GalleryItem1” located in a MenuTool with header “GalleryTool” within a RibbonGroup with header “Group2” in Tab with header “Tab1”.
XamRibbon(RibbonName).PerformToolAction
Click, ARRAY("RibbonGroup", "Tab1", "Group2", “GalleryTool”, "GalleryItem1")
Clicking an ApplicationMenu button to open its DropDown menu.
XamRibbon(RibbonName).PerformToolAction
DropDown, “ApplicationMenu”
Clicking the QuickCustomizeMenu tool to open its DropDown menu.
XamRibbon(RibbonName).PerformToolAction
DropDown, “QuickCustomizeMenu”
Clicking the ButtonTool with header “Button” located in RibbonGroup with header “Group3” in a tab with header “Tab2” to open its DropDown menu.
XamRibbon(RibbonName).PerformToolAction
DropDown, ARRAY("RibbonGroup", "Tab2", "Group3", "Button")
Clicking the ButtonTool with header “ButtonDrop” located in ApplicationMenuLeftArea to open its DropDown menu.
XamRibbon(RibbonName).PerformToolAction
DropDown, ARRAY("ApplicationMenuLeftArea", "ButtonDrop")
Clicking the ButtonTool with header “Button” located in RibbonGroup with header “Group3” in a tab with header “Tab2” to close its DropDown menu.
XamRibbon(RibbonName).PerformToolAction
CloseUp, ARRAY("RibbonGroup", "Tab2", "Group3", "Button")
Clicking the ButtonTool with header “ButtonDrop” located in ApplicationMenuLeftArea to close its DropDown menu.
XamRibbon(RibbonName).PerformToolAction
CloseUp, ARRAY("ApplicationMenuLeftArea", "ButtonDrop")
The following exceptions will result from not being able to locate a tool:
Missing or null value for either the oToolAction or oToolPath
Entering an invalid path format for identifying the tool
Specifying an invalid oToolAction
Specifying an invalid oToolPath root location, invalid headers or indices that are out of range of the total existing tools at that level.
Removing, hiding or collapsing one or more tools in the oToolPath intermediate path
Missing or invalidating the oToolValue for that specific editor control, or changing the value is not allowed for the control
Performing SetValue or SelectValue on tools other than those allowed (such as TextEditorTool , ComboEditorTool or ToggleButtonTool )
This method records the right-click action on tools to be added or removed from the QAT.
Adding a tool to the QAT
Removing a tool from the QAT
The following table explains the method’s parameter followed by code example.
ButtonTool with header “Button” located in RibbonGroup with header “Group1” Located in QuickAccessToolba r:
ARRAY("QuickAccessToolbar", "Group1", "Button")
ToggleButtonTool with header “Toggle1” located in the QuickCustomizeMenu :
ARRAY("QuickCustomizeMenu", "Toggle1”)
The following exceptions will result from not being able to locate the tool:
The oToolPath is null or missing.
The oToolPath contains invalid headers or indices which are out of range of the total existing tools at that level.
One or more tools in the intermediate path of the oToolPath were removed, hidden or collapsed.
Attempting to remove a tool from QAT, while the tool is not in QAT
Attempting to remove a tool from QAT if the Add/Remove from QAT for that tool is not allowed or disabled if the tool is already added to QAT.
This action toggles between minimizing and restoring of the ribbon control.
Minimizing the ribbon.
Maximizing the ribbon.
The following table explains the method’s parameter followed by code example.
Selecting “Minimize the Ribbon” from QAT drop-down sets the ToggleMinimizeRibbon to True
and records the following script:
WpfWindow("Window1").XamRibbon("xamRibbon").PerformToolAction DropDown, "QuickCustomizeMenu"
WpfWindow("Window1").XamRibbon("xamRibbon").ToggleMinimizeRibbon True
If minimizing the ribbon is not allowed and you try to minimize it anyway will result in throwing an exception stating the reason.
This action toggles between placing the QuickAccessToolBar below or above the ribbon groups.
Choosing to show QuickAccessToolbar below the ribbon.
Choosing to show QuickAccessToolbar above the ribbon.
Selecting “Show Below the Ribbon” from QAT drop-down sets the ToggleQATLocation to True
and records the following script:
WpfWindow("Window1").XamRibbon("xamRibbon").PerformToolAction DropDown, "QuickCustomizeMenu"
WpfWindow("Window1").XamRibbon("xamRibbon").ToggleQATLocation True
The following table explains the method’s parameter followed by code example.
None
The following topics provide additional information related to this topic.