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
860
Can't add to QAT
posted

I'm attempting to add a ButtonTool to the quick access toolbar but nothing is showing up. What I would really like to do is add the ButtonTool to the ribbon's ToolsNotInRibbon collection so that the tool only shows up in the QAT. I've attached a sample project that illustrates my problem. The relevant code is in the MainWindowView.xaml.cs in the GetRibbonTabItem to show the ToolsNotInRibbon problem and the HostRibbon_OnLoaded that shows the issue with it not showing when added as a normal ButtonTool.QuickAccess.zip 

Parents
No Data
Reply
  • 34810
    Offline posted

    Hello Collin,

    I have been investigating the sample project you have provided, and it appears that the reason that you are unable to add your ButtonTool to the QuickAccessToolbar in your sample is due to a timing issue. Currently, on my end, the sample you have provided actually crashes as a result of trying to add your QatPlaceholderTool in the HostRibbon_OnLoaded event, but if I surround the code in this event in a Dispatcher.BeginInvoke action, everything is working normally. I am unsure if you are currently seeing this crash or not.

    With the above said, you should be able to add the ButtonTool to the ToolsNotInRibbon collection of the XamRibbon and still have them show up in the QAT. I have modified the sample project that you have sent me such that this is now the case and am attaching it here.

    It is also worth noting that it appears that you are using the version-free assemblies and so I cannot be sure which version you are actually using in this case. My tests were made against version 18.1.20181.255 in Infragistics for WPF 2018.1.

    I hope this helps. Please let me know if you have any other questions or concerns on this matter.

    2626.QuickAccess.zip

Children