Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
345
[QAT] how to add a custom item to quick access tool bar
posted

Hi,

  I have implemented several custom controls which added to XamRibbon, sample codes below:

 AdvRibbonMenuButton is sub-class of ItemsControl, AdvRibbonMenuItem is sub of MenuItem;

 AdvImageTool is sub-class of ToggleButton.

<igRibbon:RibbonGroup Margin="0,1,0,0"                                                       VerticalAlignment="Top"                                                       FlowDirection="LeftToRight">                                     <StackPanel Margin="0,0,0,0"                                                 VerticalAlignment="Top"                                                 Orientation="Horizontal">                                         <CommonCtr:AdvRibbonMenuButton x:Name="mnutApproveOrder"                                                                        Margin="4,0,4,0"                                                                        ButtonType="Segmented"                                                                        ImageSource="/Advent.UI;component/Resource/Images/Trade/order_status_16.png"                                                                        PrimaryActionCommand="{Binding ApproveOrderCommand}"                                                                        ToolTip="Order Status">                                             <CommonCtr:AdvRibbonMenuItem x:Name="mnuiApproveOrder"                                                                          Command="{Binding ApproveOrderCommand}"                                                                          Header="Approve Order" />                                             <CommonCtr:AdvRibbonMenuItem x:Name="mnuiUnapproveOrder"                                                                          Command="{Binding UnApproveOrderCommand}"                                                                          Header="Unapprove Order" />                                         CommonCtr:AdvRibbonMenuButton>

<CommonCtr:AdvImageMenuTool x:Name="mnutOpenPreallocation"                                                                     Margin="4,0,4,0"                                                                     Command="{Binding EditPreAllocationCommand}"                                                                     ImageSource="/Advent.UI;component/Resource/Images/Trade/preallocation_screen_16.png"                                                                     ToolTip="Pre-allocation View" />

I checked online that seems like only control like ButtonTool, MenuTool which has come from ButtonBase can get into the QAT.

So my question is: how can I add those to QAT, code behind or designer are both fine.

Really appreciate.

Thanks,

Nathan

Parents
No Data
Reply
  • 6365
    Verified Answer
    Offline posted

    Hello,

    The QAT is designed to contain and display cloned copies of tools that are actually defined somewhere else in the XamRibbon. This place can be:
    - In a RibbonGroup
    - On a Menu tool
    - On the Application menu's footer toolbar
    - In the XamRibbon's ToolsNotInRibbon collection


    The tools that are contained within the QAT are QatPlaceholderTools, which are simply placeholders for other Ribbon tools or groups. In order to include a Ribbon tool or a group inside the QAT, it should introduce an Id property itself. That is why a QatPlaceHolderTool needs to have its respective TargetId property set to know which actual Ribbon tool or group should be cloned and included in the QAT.
     
    For more detailed information on the QAT and how to add a tool or a group to the QAT, you can take a look at the following links from our website:
    1) About QuickAccessToolbar
    2) Add a Tool or RibbonGroup to the Quick Access Toolbar
    3) At the following thread a similar issue has been discussed in regards to creating a custom tool:
    http://ko.infragistics.com/community/forums/t/55886.aspx
    4) In the Samples Browser of our WPF product, there is a sample for implementing the IRibbonTool, that may also help you achieve the desired behavior: XamRibbon > Display > Customtools
     
    If you require any further assistance on this matter, please let me know.

Children
No Data