QAT - Deserialized Buttons Inactive

Ribbon for WPF Forum

Posted 8 years ago by Bret Naughton
Avatar
Hi,

Think I may be having the same issue as noticed in another thread.

All my ribbon/QAT buttons are just referencing my own command class, which then defines the name; image; label; etc.)

What I have found is that when I serialize/deserialize, the buttons appear in the QAT but are inactive. Also, my command is not referenced in the serialized XML for any button. This is for both QAT buttons that were initially defined as the default set and buttons that at are added dynamically to the QAT by the user.

So I think i will need to loop through all QAT buttons after deserializing to reapply the correct commands.

My issue is how do I know which command after deserializing to apply to the QAT button. Sort of running in circles at the moment in being able to determine the intended command for the QAT button, especially for dynamically added buttons. Is there a property I can set storing the correct command name for each button, so that I can pick up the name of the command from the button when it comes to actually set the correct command to the correct button.

Sorry if the above is little confusing.

Thanks,
Bret

[Modified at 08/18/2011 09:28 AM]

Comments (2)

Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Bret,

The best way may be to use the Id property to identify each control like:
<ribbon:Button Id="New" Command="ApplicationCommands.New" />


Actipro Software Support

Posted 8 years ago by Bret Naughton
Avatar
Many thanks, that works fine. I just compare the id with my applicationcommand name from the collection and I am able to then set the relevant command.

Thanks Again,
Bret
The latest build of this product (v2018.1 build 0675) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.