-
I am requesting help on adding a quickaccess item dynamically. I have reviewed the code examples but, didn't see what I am trying to do. Your guidance is greatly appreciated. Thanks Rick I have a Fluent ribbon with quick access items. I am looking to add an item to the bar in my Mainwindow.cs code. Below is code that I have tried and it add a "Test" item with icon to the menu, not the quick access bar. And, I am struggling on what the command would be (it is commented out). Code in MainWindow.CS:
// AddMenuItem.CommandBindings = new CommandBindingCollection(); Quickaccess xml in the MainWindow.xml: Fluent:Ribbon.QuickAccessItems
</Fluent:Ribbon.QuickAccessItems> |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
To get an item to show up in the toolbar, not only the menu, you have to set a target on the menu item. |
Beta Was this translation helpful? Give feedback.
-
Batzen, I appreciate your support. Do you have an example of setting up a quickaccess menu item in code behind? And, I was wondering as well how do you save the quickaccess setup after a user changes it? I am new to Fluent Ribbon and again appreciate the help. I have reviewed your showcase and didn't see this example. Rick |
Beta Was this translation helpful? Give feedback.
-
Batzen, I was able to connect the click event to the dynamic menu item, but still need help making it show up on the toolbar. Can you please show me in code behind how to set the target? Below is what I currently have without the target being set in MainWindow.cs.
|
Beta Was this translation helpful? Give feedback.
-
Batzen Thank you very much. It worked great and so simple. Rick |
Beta Was this translation helpful? Give feedback.
There is no need to set the icon etc. on the menu item directly.
Just use
That should work.
Instead of adding a click handler you could also use a command.