Actipro Ribbon has been designed so that nearly any control can be used within the Ribbon itself, in ribbon menus, or in popups.
For the purposes of this topic, we will use the term "custom control" to mean any non-ribbon control. This could be a UserControl
, any native WPF control, or any control from a third-party.
A custom UserControl used as the content for a PopupButton's popup
Custom Controls in the Ribbon
Custom controls can be used in the ribbon simply by including them directly within a Group or by using them within a RowPanel or StackPanel.
A Ribbon that contains a MediaElement control
Note
If the custom control is used within a RowPanel or StackPanel, it must be able to support a small height that is normally associated with standard Button
or ComboBox
heights.
Here is some XAML code showing how the screenshot above was created.
Custom Controls in Menus
Custom controls can be used in the Menu control.
A Menu containing the DateTimePicker control, which is a non-ribbon control defined in the Shared Library
When they are added to a Menu, there are some special attached properties that need to be set to properly lay out the control in relation to the other menu items and give the control an optional external label and image.
See the Menu topic for details on how to do this.
Here is some XAML code showing how the screenshot above was created.
Custom Controls in Popups
The use of custom controls in popups is fully supported. Popups are used by the PopupButton, RibbonGallery, and SplitButton controls.
To use a custom control in a popup, set it to the popup anchor's PopupPopupButton
and SplitButton
tags.
Here is some XAML code showing the use of a custom color picker UserControl
within a PopupButton
. This code is used in the Document Editor demo and is displayed in the screenshot above.
You also can create complex layouts of popup child controls, meaning that you can support a mix of one or more custom controls with other controls like Menu controls. See the Working with Popups topic for more information on all the things that are possible with popups.