The generic OPC UA browsing control is represented by the UABrowseControl Class (in Windows Forms) or by the WpfUABrowseControl Class (in WPF).
With it, your forms can integrate a control with various OPC nodes from which the user can select. This control can be configured to serve many different purposes.
Here is an example of the generic OPC browsing control in action:
The functionality and properties of the UABrowseControl or WpfUABrowseControl are similar to that of UABrowseDialog, described earlier in this text. Please refer to the documentation of UABrowseDialog for details. Here are the major differences:
Using the Kind property, the browsing control can be configured to provide a tree view only (BrowseControlKinds.Tree), a list view only (BrowseControlKinds.List), or a combined tree view and list view (BrowseControlKinds.TreeAndList; this is the default).
The View property (of System.Windows.Forms.View enumeration type) controls how the list view items are displayed. Possible values are LargeIcon, Details (the default), SmallIcon, List, or Tile.
In order to achieve tight integration with other controls on your form, you can hook to events that the browsing control provides.
The CurrentNodeChanged event occurs when the current node changes. You can obtain the information about the new current node from InputsOutputs.CurrentNodeDescriptor and Outputs.CurrentNodeElement properties inside the event handler.
The SelectionChanged event is meant for multi-selection mode, and occurs when the selection set changes. You can obtain the information about the new selection set from InputsOutputs.SelectionDescriptors and Outputs.SelectionElements collections inside the event handler.
The NodeDoubleClick event occurs when a node is double-clicked. This is the current node, and therefore the information about it can be obtained in the same way as in the CurrentNodeChanged event handler, described above.
The BrowseFailure event indicates that an exception has occurred during browsing. The information about the exception is contained in the event arguments.
In Windows Forms, the generic OPC UA browsing control is represented by the UABrowseControl Class, which is implemented directly in the Windows Forms technology. There is also a corresponding icon in the Visual Studio Toolbox that you drag onto a design surface of your forms or user control.
In WPF (Windows Presentation Foundation), the generic OPC UA browsing control is represented by the WpfUABrowseControl Class, which is implemented as a WPF wrapper arround the Windows Forms control (UABrowseControl). There is also a corresponding icon in the Visual Studio Toolbox that you drag onto a design surface of your window.
If you want to change the parameters of the client objects the component uses to perform its OPC operations, you can use the ClientSelector Property.