Show / Hide Table of Contents

Class UIEnvironment

Provides access to the application's UI environment

Inheritance
object
UIEnvironment
Namespace: ABB.Robotics.RobotStudio.Environment
Assembly: ABB.Robotics.RobotStudio.Environment.dll
Syntax
public sealed class UIEnvironment
Remarks

It is not possible to create an instance of this class; all methods are static.

Properties

View Source

ActiveNonContextualRibbonTab

Gets the last active non-contextual tab. If the currently active tab is a non-contextual tab, it will be returned.

Declaration
public static RibbonTab ActiveNonContextualRibbonTab { get; }
Property Value
Type Description
RibbonTab
View Source

ActiveRibbonTab

Gets or sets the currently active tab in the Ribbon

Declaration
public static RibbonTab ActiveRibbonTab { get; set; }
Property Value
Type Description
RibbonTab
View Source

ApplicationMenu

Returns the application menu displayed when the Application Button is pressed

Declaration
public static ApplicationMenu ApplicationMenu { get; }
Property Value
Type Description
ApplicationMenu
View Source

BackstageVisible

True if the Backstage (File) tab is currently active, false otherwise.

Declaration
public static bool BackstageVisible { get; set; }
Property Value
Type Description
bool
Remarks

Note that the Backstage/File tab is not part of the RibbonTabs collection.

View Source

CommandBarControls

Returns a collection of all registered CommandBarControls

Declaration
public static CommandBarControlCollection CommandBarControls { get; }
Property Value
Type Description
CommandBarControlCollection
Remarks

Controls that does not have an ID, or have never been added to a collection (this or another one) cannot be found in this collection.

View Source

CurrentlyExecutingCommand

Returns the CommandBarButton or CommandBarButtonGroup that is currently being executed, or null if no command is currently being executed.

Declaration
public static CommandBarControl CurrentlyExecutingCommand { get; }
Property Value
Type Description
CommandBarControl
View Source

DefaultWindowZoom

Gets or sets the default zoom level for windows implementing IZoomableWindow

Declaration
public static double DefaultWindowZoom { get; set; }
Property Value
Type Description
double
View Source

GroupDocumentWindows

Gets or sets if document windows are grouped based on their Category property.

Declaration
public static bool GroupDocumentWindows { get; set; }
Property Value
Type Description
bool
Remarks

Existing windows will not be regrouped if this property is changed.

View Source

MainWindow

Returns an object describing the main window

Declaration
public static MainWindow MainWindow { get; }
Property Value
Type Description
MainWindow
View Source

Notifications

Gets a collection of Notification objects that are shown in a popup when the user clicks the notification icon in the RobotStudio title bar.

Declaration
public static NotificationCollection Notifications { get; }
Property Value
Type Description
NotificationCollection
View Source

QuickAccessCandidates

Returns a collection of controls visible on the "Customize Quick Access" menu

Declaration
public static CommandBarControlCollection QuickAccessCandidates { get; }
Property Value
Type Description
CommandBarControlCollection
View Source

QuickAccessToolBar

Returns a CommandBar representing the contents of the Quick Access toolbar in the upper-left corner

Declaration
public static CommandBar QuickAccessToolBar { get; }
Property Value
Type Description
CommandBar
View Source

RibbonContextualTabs

Returns the collection of contextual tab groups defined for the ribbon

Declaration
public static RibbonContextTabGroupCollection RibbonContextualTabs { get; }
Property Value
Type Description
RibbonContextTabGroupCollection
View Source

RibbonMinimized

Gets or sets if the ribbon is minimized so that only the tabs are visible. Default is false.

Declaration
public static bool RibbonMinimized { get; set; }
Property Value
Type Description
bool
View Source

RibbonSelectionType

Gets or sets the current selection type, i.e. an object defining the type of the object(s) currently being selected

Declaration
public static object RibbonSelectionType { get; set; }
Property Value
Type Description
object
View Source

RibbonTabs

Returns the collection of (non-contextual) tabs in the Ribbon

Declaration
public static RibbonTabCollection RibbonTabs { get; }
Property Value
Type Description
RibbonTabCollection
View Source

ShowScreenTips

Gets or sets if screen tips are shown for command elements

Declaration
public static bool ShowScreenTips { get; set; }
Property Value
Type Description
bool
View Source

StatusBar

Returns the main statusbar

Declaration
public static StatusBar StatusBar { get; }
Property Value
Type Description
StatusBar
View Source

UserToolBar

Returns a CommandBar representing the contents of the User toolbar in the upper-right corner

Declaration
public static CommandBar UserToolBar { get; }
Property Value
Type Description
CommandBar
View Source

VisibleRibbonContextualTabs

Returns the collection of currently visible contextual tab groups

Declaration
public static RibbonContextTabGroupCollection VisibleRibbonContextualTabs { get; }
Property Value
Type Description
RibbonContextTabGroupCollection
View Source

VisualStyle

Returns an object containing Visual Styles-related information for the application

Declaration
public static VisualStyle VisualStyle { get; }
Property Value
Type Description
VisualStyle
View Source

Windows

Returns a collection of all Windows in the application

Declaration
public static WindowCollection Windows { get; }
Property Value
Type Description
WindowCollection

Methods

View Source

DisableCommands(Task)

Disables all commands until the specified task has completed;

Declaration
public static void DisableCommands(Task task)
Parameters
Type Name Description
Task task
View Source

Exit()

Exits the application

Declaration
public static void Exit()
View Source

GetActiveNotificationAreaHelpId()

Gets the currently active notification area help ID

Declaration
public static string GetActiveNotificationAreaHelpId()
Returns
Type Description
string
View Source

GetContextMenu(object)

Gets or creates a context menu popup for the specified selection type

Declaration
public static CommandBarContextPopup GetContextMenu(object ctxType)
Parameters
Type Name Description
object ctxType
Returns
Type Description
CommandBarContextPopup
View Source

GetContextMenus()

Gets a dictionary that contains all specified selection types and their associated context menu popup.

Declaration
public static IReadOnlyDictionary<object, CommandBarContextPopup> GetContextMenus()
Returns
Type Description
IReadOnlyDictionary<object, CommandBarContextPopup>
View Source

HideNotificationArea()

Hides the default notification area above the DocumentWindow tabs

Declaration
public static void HideNotificationArea()
View Source

HideNotificationArea(string)

Hides the notification area with the specified Id.

Declaration
public static void HideNotificationArea(string id)
Parameters
Type Name Description
string id

Notification area id

View Source

LoadWindowConfiguration(TextReader)

Loads a window and toolbar configuration from a stream

Declaration
public static void LoadWindowConfiguration(TextReader reader)
Parameters
Type Name Description
TextReader reader

Stream to read from

View Source

LoadWindowConfiguration(TextReader, IEnumerable<string>)

Loads a window and toolbar configuration from a stream

Declaration
public static void LoadWindowConfiguration(TextReader reader, IEnumerable<string> windowIDs)
Parameters
Type Name Description
TextReader reader

Stream to read from

IEnumerable<string> windowIDs

A collection of window ids for which the configuration should be applied. The collection needs to contain at least one id

View Source

OnActivateWindow(Window)

Moves a window to the front of the list that is used to determine the active window when switching between ribbon tabs.

Declaration
public static void OnActivateWindow(Window wnd)
Parameters
Type Name Description
Window wnd
View Source

PresentDocumentWindow(DocumentWindow)

Ensures that a DocumentWindow is presented on screen.

Declaration
public static void PresentDocumentWindow(DocumentWindow window)
Parameters
Type Name Description
DocumentWindow window

The DocumentWindow to present.

View Source

SaveDockedWindowsConfiguration(TextWriter)

Only save docked windows

Declaration
public static void SaveDockedWindowsConfiguration(TextWriter writer)
Parameters
Type Name Description
TextWriter writer

Stream to write to

View Source

SaveWindowConfiguration(TextWriter)

Saves the current window and toolbar configuration to file

Declaration
public static void SaveWindowConfiguration(TextWriter writer)
Parameters
Type Name Description
TextWriter writer

Stream to write to

View Source

ShowContextMenu(object[], int, int)

Shows a context menu for the specified selection types

Declaration
public static void ShowContextMenu(object[] selTypes, int x, int y)
Parameters
Type Name Description
object[] selTypes

Selection types to build context menu for

int x

Menu x-position (in screen coordinates)

int y

Menu y-position (in screen coordinates)

Remarks

Only context menu items valid for all given types will be displayed.

View Source

ShowNotificationArea(Image, string, CommandBarPopup, string)

Displays a notification area above the DocumentWindow tabs

Declaration
public static void ShowNotificationArea(Image image, string text, CommandBarPopup menuPopup, string helpId)
Parameters
Type Name Description
Image image

Small (16x16) Image to be displayed before the text (can be null)

string text

Text to be displayed in the notification area

CommandBarPopup menuPopup

Menu that will be displayed when the area is clicked (can be null)

string helpId

Context help ID

View Source

ShowNotificationArea(Image, string, CommandBarPopup, string, DocumentWindow)

Displays a notification area above the DocumentWindow tabs

Declaration
public static void ShowNotificationArea(Image image, string text, CommandBarPopup menuPopup, string helpId, DocumentWindow associatedWindow)
Parameters
Type Name Description
Image image

Small (16x16) Image to be displayed before the text (can be null)

string text

Text to be displayed in the notification area

CommandBarPopup menuPopup

Menu that will be displayed when the area is clicked (can be null)

string helpId

Context help ID

DocumentWindow associatedWindow

The notification area will only be visible if the associated DocumentWindow is also visible.

View Source

ShowNotificationArea(string, Image, string, CommandBarPopup, string)

Displays a notification area above the DocumentWindow tabs

Declaration
public static void ShowNotificationArea(string id, Image image, string text, CommandBarPopup menuPopup, string helpId)
Parameters
Type Name Description
string id

Unique identifier for this notification area.

Image image

Small (16x16) Image to be displayed before the text (can be null)

string text

Text to be displayed in the notification area

CommandBarPopup menuPopup

Menu that will be displayed when the area is clicked (can be null)

string helpId

Context help ID

Remarks

Use this instead of ShowNotificationArea(Image, string, CommandBarPopup, string) for displaying multiple notification areas simultaneously.

View Source

ShowNotificationArea(string, Image, string, CommandBarPopup, string, DocumentWindow)

Displays a notification area above the DocumentWindow tabs

Declaration
public static void ShowNotificationArea(string id, Image image, string text, CommandBarPopup menuPopup, string helpId, DocumentWindow associatedWindow)
Parameters
Type Name Description
string id

Unique identifier for this notification area.

Image image

Small (16x16) Image to be displayed before the text (can be null)

string text

Text to be displayed in the notification area

CommandBarPopup menuPopup

Menu that will be displayed when the area is clicked (can be null)

string helpId

Context help ID

DocumentWindow associatedWindow

The notification area will only be visible if the associated DocumentWindow is also visible.

Remarks

Use this instead of ShowNotificationArea(string, Image, string, CommandBarPopup, string) for displaying multiple notification areas simultaneously.

View Source

ShowNotificationArea(string, Control, string, DocumentWindow)

Displays a notification area with a custom control above the DocumentWindow tabs

Declaration
public static void ShowNotificationArea(string id, Control control, string helpId = null, DocumentWindow associatedWindow = null)
Parameters
Type Name Description
string id

Unique identifier for this notification area.

Control control

Control to display in the area.

string helpId

Context help ID

DocumentWindow associatedWindow

The notification area will only be visible if the associated DocumentWindow is also visible.

Remarks

The height of the control must be a low value.

View Source

UpdateUI()

Forces an update of the GUI (command enabled status etc)

Declaration
public static void UpdateUI()

Events

View Source

ActiveRibbonTabChanged

Raised after the active RibbonTab has been changed

Declaration
public static event EventHandler ActiveRibbonTabChanged
Event Type
Type Description
EventHandler
View Source

ActiveRibbonTabChanging

Raised before the active RibbonTab changes

Declaration
public static event EventHandler ActiveRibbonTabChanging
Event Type
Type Description
EventHandler
View Source

BackstageVisibleChanged

Raised when the BackstageVisible property has been changed

Declaration
public static event EventHandler BackstageVisibleChanged
Event Type
Type Description
EventHandler
View Source

Exception

Raised when an exception is thrown by an event handler and caught by the environment.

Declaration
public static event ExceptionEventHandler Exception
Event Type
Type Description
ExceptionEventHandler
View Source

ExecutedCommand

Raised after a command has been executed

Declaration
public static event ExecutedCommandEventHandler ExecutedCommand
Event Type
Type Description
ExecutedCommandEventHandler
View Source

ExecutingCommand

Raised whenever a command is about to be executed

Declaration
public static event ExecutingCommandEventHandler ExecutingCommand
Event Type
Type Description
ExecutingCommandEventHandler
View Source

Exited

Raised when the application has started to shutdown

Declaration
public static event EventHandler Exited
Event Type
Type Description
EventHandler
Remarks

The EventArgs argument can be cast to a ExitedEventArgs for registering tasks that must be completed before the application process exits.

View Source

Exiting

Raised before the application exits, giving clients a chance to abort the shutdown

Declaration
public static event CancelEventHandler Exiting
Event Type
Type Description
CancelEventHandler
View Source

Idle

Equivalent to Application.Idle, but occurs at a lower rate (maximum four times per second)

Declaration
public static event EventHandler Idle
Event Type
Type Description
EventHandler
View Source

RibbonSelectionTypeChanged

Raised when the RibbonSelectionType property has been changed

Declaration
public static event EventHandler RibbonSelectionTypeChanged
Event Type
Type Description
EventHandler
View Source

TrackCommandBarControl

Raised when a CommandBarControl is tracked

Declaration
public static event TrackCommandBarControlEventHandler TrackCommandBarControl
Event Type
Type Description
TrackCommandBarControlEventHandler
View Source

UpdateCommandUI

Raised when a command's UI state must be updated

Declaration
public static event UpdateCommandUIEventHandler UpdateCommandUI
Event Type
Type Description
UpdateCommandUIEventHandler
  • View Source
In this article
Back to top Copyright © 2025 ABB