Depending on the value of the TargetType property, setting this property to the RibbonToolHelper.IdProperty of a tool or RibbonGroupthat has been defined somewhere on the XamRibbon causes a clone of that object to be created and displayed inside this QatPlaceholderTool.
Tools can be added to QuickAccessToolbar by the end user (via the right click context menu provided for each tool) or by the developer (by adding a QatPlaceholderTool that references the Id of a tool). RibbonGroups can be added to the QuickAccessToolbar by the end user by right clicking on the caption of the RibbonGroup in a RibbonTabItem.
' Creating ButtonTool Dim btnToolCopy As New ButtonTool() btnToolCopy.Id = "copyTool" ' Adding ButtonTool to the QAT Dim qatToolCopy As New QatPlaceholderTool() qatToolCopy.TargetId = "copyTool" ' btnToolCopy.Id qatToolCopy.TargetType = QatPlaceholderToolType.Tool xamRibbon.QuickAccessToolbar.Items.Add(qatToolCopy)
// Creating ButtonTool ButtonTool btnToolCopy = new ButtonTool(); btnToolCopy.Id = "copyTool"; // Adding ButtonTool to the QAT QatPlaceholderTool qatToolCopy = new QatPlaceholderTool(); qatToolCopy.TargetId = "copyTool"; // btnToolCopy.Id qatToolCopy.TargetType = QatPlaceholderToolType.Tool; xamRibbon.QuickAccessToolbar.Items.Add(qatToolCopy);
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, 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