Intersoft.Client.UI.Aqua.UXRibbon Namespace : UXRibbonBar Class |
<TemplatePartAttribute(Name="ExpandedContentElement", Type=System.Windows.Controls.ContentControl)> <TemplatePartAttribute(Name="ContextualTabGroupItemsControlElement", Type=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonContextualTabGroupItemsControl)> <TemplatePartAttribute(Name="ExpanderButton", Type=Intersoft.Client.UI.Aqua.UXFlatButton)> <StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonTab)> <TemplatePartAttribute(Name="RibbonTitlePanelElement", Type=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonTitlePanel)> <TemplatePartAttribute(Name="QuickAccessToolBarElement", Type=System.Windows.Controls.ContentPresenter)> <TemplatePartAttribute(Name="EllipsisTitleElement", Type=System.Windows.Controls.TextBlock)> <TemplatePartAttribute(Name="PopupBarElement", Type=Intersoft.Client.UI.Controls.UXPopup)> <TemplatePartAttribute(Name="CollapsedContentElement", Type=System.Windows.Controls.ContentControl)> <TemplatePartAttribute(Name="TopDockElement", Type=Intersoft.Client.UI.Controls.DockPanel)> <TemplatePartAttribute(Name="IconElement", Type=System.Windows.Controls.Image)> <StyleTypedPropertyAttribute(Property="RibbonToolTipStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonToolTip)> <TemplatePartAttribute(Name="HeaderElement", Type=System.Windows.Controls.Border)> <TemplatePartAttribute(Name="ItemsPresenterElement", Type=System.Windows.Controls.ItemsPresenter)> <TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)> <TemplatePartAttribute(Name="RightButtonLauncher", Type=Intersoft.Client.UI.Aqua.UXFlatButton)> <TemplatePartAttribute(Name="GridHeaderElement", Type=System.Windows.Controls.Grid)> <TemplatePartAttribute(Name="ApplicationMenuPlaceHolder", Type=System.Windows.Controls.ContentPresenter)> <TemplatePartAttribute(Name="SelectedContentElement", Type=System.Windows.Controls.ContentControl)> <TemplatePartAttribute(Name="FooterGridElement", Type=System.Windows.Controls.Grid)> <TemplatePartAttribute(Name="FooterQuickAccessToolBarContent", Type=System.Windows.Controls.ContentControl)> <TemplatePartAttribute(Name="WindowCommandPlaceHolder", Type=System.Windows.Controls.ContentControl)> <TemplatePartAttribute(Name="MoveableContent", Type=System.Windows.Controls.ContentPresenter)> <TemplatePartAttribute(Name="SelectedContentBorderElement", Type=System.Windows.Controls.Border)> <DescriptionAttribute("Represents a rich Office 2010 style ribbon bar control which contains a collection of tabs, groups and commands.")> Public Class UXRibbonBar Inherits Intersoft.Client.Framework.ISSelectionControl Implements Intersoft.Client.Framework.IControl, Intersoft.Client.Framework.IFramework, Intersoft.Client.Framework.IItemsControl, Intersoft.Client.Framework.ILicensing, Intersoft.Client.Framework.ISelection
Dim instance As UXRibbonBar
[TemplatePartAttribute(Name="ExpandedContentElement", Type=System.Windows.Controls.ContentControl)] [TemplatePartAttribute(Name="ContextualTabGroupItemsControlElement", Type=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonContextualTabGroupItemsControl)] [TemplatePartAttribute(Name="ExpanderButton", Type=Intersoft.Client.UI.Aqua.UXFlatButton)] [StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonTab)] [TemplatePartAttribute(Name="RibbonTitlePanelElement", Type=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonTitlePanel)] [TemplatePartAttribute(Name="QuickAccessToolBarElement", Type=System.Windows.Controls.ContentPresenter)] [TemplatePartAttribute(Name="EllipsisTitleElement", Type=System.Windows.Controls.TextBlock)] [TemplatePartAttribute(Name="PopupBarElement", Type=Intersoft.Client.UI.Controls.UXPopup)] [TemplatePartAttribute(Name="CollapsedContentElement", Type=System.Windows.Controls.ContentControl)] [TemplatePartAttribute(Name="TopDockElement", Type=Intersoft.Client.UI.Controls.DockPanel)] [TemplatePartAttribute(Name="IconElement", Type=System.Windows.Controls.Image)] [StyleTypedPropertyAttribute(Property="RibbonToolTipStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonToolTip)] [TemplatePartAttribute(Name="HeaderElement", Type=System.Windows.Controls.Border)] [TemplatePartAttribute(Name="ItemsPresenterElement", Type=System.Windows.Controls.ItemsPresenter)] [TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)] [TemplatePartAttribute(Name="RightButtonLauncher", Type=Intersoft.Client.UI.Aqua.UXFlatButton)] [TemplatePartAttribute(Name="GridHeaderElement", Type=System.Windows.Controls.Grid)] [TemplatePartAttribute(Name="ApplicationMenuPlaceHolder", Type=System.Windows.Controls.ContentPresenter)] [TemplatePartAttribute(Name="SelectedContentElement", Type=System.Windows.Controls.ContentControl)] [TemplatePartAttribute(Name="FooterGridElement", Type=System.Windows.Controls.Grid)] [TemplatePartAttribute(Name="FooterQuickAccessToolBarContent", Type=System.Windows.Controls.ContentControl)] [TemplatePartAttribute(Name="WindowCommandPlaceHolder", Type=System.Windows.Controls.ContentControl)] [TemplatePartAttribute(Name="MoveableContent", Type=System.Windows.Controls.ContentPresenter)] [TemplatePartAttribute(Name="SelectedContentBorderElement", Type=System.Windows.Controls.Border)] [DescriptionAttribute("Represents a rich Office 2010 style ribbon bar control which contains a collection of tabs, groups and commands.")] public class UXRibbonBar : Intersoft.Client.Framework.ISSelectionControl, Intersoft.Client.Framework.IControl, Intersoft.Client.Framework.IFramework, Intersoft.Client.Framework.IItemsControl, Intersoft.Client.Framework.ILicensing, Intersoft.Client.Framework.ISelection
[TemplatePartAttribute(Name="ExpandedContentElement", Type=System.Windows.Controls.ContentControl)] [TemplatePartAttribute(Name="ContextualTabGroupItemsControlElement", Type=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonContextualTabGroupItemsControl)] [TemplatePartAttribute(Name="ExpanderButton", Type=Intersoft.Client.UI.Aqua.UXFlatButton)] [StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonTab)] [TemplatePartAttribute(Name="RibbonTitlePanelElement", Type=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonTitlePanel)] [TemplatePartAttribute(Name="QuickAccessToolBarElement", Type=System.Windows.Controls.ContentPresenter)] [TemplatePartAttribute(Name="EllipsisTitleElement", Type=System.Windows.Controls.TextBlock)] [TemplatePartAttribute(Name="PopupBarElement", Type=Intersoft.Client.UI.Controls.UXPopup)] [TemplatePartAttribute(Name="CollapsedContentElement", Type=System.Windows.Controls.ContentControl)] [TemplatePartAttribute(Name="TopDockElement", Type=Intersoft.Client.UI.Controls.DockPanel)] [TemplatePartAttribute(Name="IconElement", Type=System.Windows.Controls.Image)] [StyleTypedPropertyAttribute(Property="RibbonToolTipStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonToolTip)] [TemplatePartAttribute(Name="HeaderElement", Type=System.Windows.Controls.Border)] [TemplatePartAttribute(Name="ItemsPresenterElement", Type=System.Windows.Controls.ItemsPresenter)] [TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)] [TemplatePartAttribute(Name="RightButtonLauncher", Type=Intersoft.Client.UI.Aqua.UXFlatButton)] [TemplatePartAttribute(Name="GridHeaderElement", Type=System.Windows.Controls.Grid)] [TemplatePartAttribute(Name="ApplicationMenuPlaceHolder", Type=System.Windows.Controls.ContentPresenter)] [TemplatePartAttribute(Name="SelectedContentElement", Type=System.Windows.Controls.ContentControl)] [TemplatePartAttribute(Name="FooterGridElement", Type=System.Windows.Controls.Grid)] [TemplatePartAttribute(Name="FooterQuickAccessToolBarContent", Type=System.Windows.Controls.ContentControl)] [TemplatePartAttribute(Name="WindowCommandPlaceHolder", Type=System.Windows.Controls.ContentControl)] [TemplatePartAttribute(Name="MoveableContent", Type=System.Windows.Controls.ContentPresenter)] [TemplatePartAttribute(Name="SelectedContentBorderElement", Type=System.Windows.Controls.Border)] [DescriptionAttribute("Represents a rich Office 2010 style ribbon bar control which contains a collection of tabs, groups and commands.")] public ref class UXRibbonBar : public Intersoft.Client.Framework.ISSelectionControl, Intersoft.Client.Framework.IControl, Intersoft.Client.Framework.IFramework, Intersoft.Client.Framework.IItemsControl, Intersoft.Client.Framework.ILicensing, Intersoft.Client.Framework.ISelection
UXRibbonBar is a sophisticated command bar that organizes program's features into a series of tabs at the top of a window. The ribbon user interface increases discoverability of features and functions which enables quicker learning of the program as a whole, and makes users feel more in control of their experience with the program. A ribbon can replace both the traditional menu bar and toolbars. UXRibbonBar supports unified API for both Silverlight and WPF application development.
Commands in UXRibbonBar can be grouped into several tabs. In each tab, commands can be further categorized into several groups. It gives you the flexibility to control the grouping of your application commands which allow users to quickly learn the functionality available in your application. In addition, you can specify most frequently accessed commands in ApplicationMenu and QuickAccessToolbar.
The following code shows how to create a simple UXRibbonBar with commands in application menu, backstage menu, quick access toolbar, three tabs and two groups in the first tab.
XAML |
Copy Code
|
---|---|
<Intersoft:UXRibbonBar Intersoft:UXRibbonKeyTipService.EnableKeyTips="True" MinRibbonBarHeight="106"> <Intersoft:UXRibbonBar.ApplicationMenu> <Intersoft:UXRibbonApplicationMenu Content="File"> <Intersoft:UXRibbonApplicationMenuItem Header="Save" Icon="/assets/icons/save.png" /> <Intersoft:UXRibbonApplicationMenuItem Header="Save As" Icon="/assets/icons/wordother.png" /> <Intersoft:UXRibbonApplicationMenuItem Header="Open" Icon="/assets/icons/open_folder.png" /> <Intersoft:UXRibbonApplicationBackstageMenuItem Header="Info" Margin="0,3,0,1"> <UserControl:MenuInfo /> </Intersoft:UXRibbonApplicationBackstageMenuItem> <Intersoft:UXRibbonApplicationBackstageMenuItem Header="Recent"> <UserControl:MenuRecent /> </Intersoft:UXRibbonApplicationBackstageMenuItem> <Intersoft:UXRibbonApplicationBackstageMenuItem Header="Help" Margin="0,1,0,3"> <UserControl:MenuHelp /> </Intersoft:UXRibbonApplicationBackstageMenuItem> <Intersoft:UXRibbonApplicationMenuItem Header="Options" Icon="/assets/icons/options.png" /> <Intersoft:UXRibbonApplicationMenuItem Header="Exit" Command="Intersoft:WindowCommands.Close" Icon="/assets/icons/close.png" /> </Intersoft:UXRibbonApplicationMenu> </Intersoft:UXRibbonBar.ApplicationMenu> <Intersoft:UXRibbonBar.QuickAccessToolBar> <Intersoft:UXRibbonQuickAccessToolBar> <Intersoft:UXRibbonToolBarButton DisplayMode="Image" Content="New" Icon="/assets/icons/new.png" /> <Intersoft:UXRibbonToolBarButton DisplayMode="Image" Content="Open" Icon="/assets/icons/open_folder.png" /> <Intersoft:UXRibbonToolBarButton DisplayMode="Image" Content="Save" Icon="/assets/icons/save.png" /> </Intersoft:UXRibbonQuickAccessToolBar> </Intersoft:UXRibbonBar.QuickAccessToolBar> <Intersoft:UXRibbonTab Header="Home" ResizeOrder="desktopgroup1, desktopgroup2, desktopgroup2"> <Intersoft:UXRibbonTabGroup x:Name="desktopgroup1" Header="Clipboard" MinimumSize="Small" MaximumSize="Medium" Size="Medium" IsCollapsible="False"> <Intersoft:UXRibbonSplitButton Content="Paste" LargeIcon="/assets/icons/paste.png" MinimumSize="Large" MaximumSize="Large" Command="local:EditingCommands.Paste" /> <Intersoft:UXRibbonButton Content="Cut" Icon="/assets/icons/cut.png" MaximumSize="Medium" Command="local:EditingCommands.Cut" /> <Intersoft:UXRibbonButton Content="Copy" Icon="/assets/icons/copy.png" MaximumSize="Medium" Command="local:EditingCommands.Copy" /> <Intersoft:UXRibbonButton Content="Format Painter" Icon="/assets/icons/copy_folder.png" MaximumSize="Medium" Command="{Binding TriggerCommand}" CommandParameter="Format Painter" /> </Intersoft:UXRibbonTabGroup> <Intersoft:UXRibbonTabOrderedGroup x:Name="desktopgroup2" Header="Font" Icon="/assets/icons/font.png"> <Intersoft:UXRibbonComboBox Width="105" SelectedIndex="0" /> <Intersoft:UXRibbonComboBox Size="Small" Width="40" SelectedIndex="0" /> <Intersoft:UXRibbonButton Icon="/assets/icons/font_increasesize.png" /> <Intersoft:UXRibbonButton Icon="/assets/icons/font_decreasesize.png" /> <Intersoft:UXRibbonSeparator Height="24" Margin="2,0" Intersoft:UXRibbonOrderedPanel.IsMovable="True" /> <Intersoft:UXRibbonDropDownButton Icon="/assets/icons/change_case.png" Intersoft:UXRibbonOrderedPanel.IsMovable="True" /> <Intersoft:UXRibbonSeparator Height="24" Margin="2,0" Intersoft:UXRibbonOrderedPanel.IsMovable="True" /> <Intersoft:UXRibbonButton Icon="/assets/icons/clear_formatting.png" Intersoft:UXRibbonOrderedPanel.IsMovable="True" /> <Intersoft:UXRibbonToggleButton Icon="/assets/icons/bold.png" Intersoft:UXRibbonOrderedPanel.IsAlternateRow="True" Command="local:EditingCommands.Bold"/> <Intersoft:UXRibbonToggleButton Icon="/assets/icons/italic.png" Intersoft:UXRibbonOrderedPanel.IsAlternateRow="True" Command="local:EditingCommands.Italic"/> <Intersoft:UXRibbonSplitButton Icon="/assets/icons/underline.png" Intersoft:UXRibbonOrderedPanel.IsAlternateRow="True" IsToggleButton="True" GalleryItemWidth="180" ContentWidth="200" GalleryItemHeight="25" /> <Intersoft:UXRibbonButton Icon="/assets/icons/strikethrough.png" Intersoft:UXRibbonOrderedPanel.IsAlternateRow="True" /> <Intersoft:UXRibbonButton Icon="/assets/icons/subscript.png" Intersoft:UXRibbonOrderedPanel.IsAlternateRow="True" /> <Intersoft:UXRibbonButton Icon="/assets/icons/superscript.png" Intersoft:UXRibbonOrderedPanel.IsAlternateRow="True" /> <Intersoft:UXRibbonSeparator Height="24" Margin="2,0" Intersoft:UXRibbonOrderedPanel.IsAlternateRow="True" Intersoft:UXRibbonOrderedPanel.IsMovable="True"/> <Intersoft:UXRibbonDropDownButton Icon="/assets/icons/texteffects.png" ContentWidth="250" Intersoft:UXRibbonOrderedPanel.IsAlternateRow="True" Intersoft:UXRibbonOrderedPanel.IsMovable="True" /> <Intersoft:UXRibbonSplitButton Icon="/assets/icons/highlight.png" Intersoft:UXRibbonOrderedPanel.IsAlternateRow="True" Intersoft:UXRibbonOrderedPanel.IsMovable="True" ContentWidth="150" GalleryItemHeight="25" GalleryItemWidth="25" /> <Intersoft:UXRibbonSplitButton Icon="/assets/icons/font_color.png" Intersoft:UXRibbonOrderedPanel.IsAlternateRow="True" Intersoft:UXRibbonOrderedPanel.IsMovable="True" GalleryItemHeight="16" GalleryItemWidth="16" ContentWidth="176" /> </Intersoft:UXRibbonTabOrderedGroup> </Intersoft:UXRibbonTab> <Intersoft:UXRibbonTab Header="Insert" /> <Intersoft:UXRibbonTab Header="Page Layout" /> </Intersoft:UXRibbonBar> |
The following figure shows the results of the example above.
There are two types of group that you can choose from. Each group type has different behaviors and configurations which will be covered in the latter section of this topic. |
System.Object
System.Windows.DependencyObject
System.Windows.UIElement
System.Windows.FrameworkElement
System.Windows.Controls.Control
System.Windows.Controls.ItemsControl
Intersoft.Client.Framework.ISItemsControl
Intersoft.Client.Framework.ISSelectionControl
Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonBar
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2