Deserialization of QAT state by Id

Ribbon for WPF Forum

Posted 13 years ago by Jan Ambroz
Version: 11.1.0545
Avatar
Hello,

I am trying to get QAT state deserialization working and I have run into a problem with the deserialization process. It seems that the Label property is used to find the appropriate ribbon item. This works fine until you localize your application and let the user to select the language. Then, after app restart, the Label is written in another language and the deserialization process fails (no error, but no items, too).

I would like to suggest the alternate method of finding the appropriate item using the Id property (which is serialized in the QAT state too). I know that it is not so easy to implement. Without this feature, I need to reset the QAT whenever the app's language is changed, which is frustrating.

Could you please consider this as a good idea?

Best regards,

Honza Ambroz.

Comments (4)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Honza,

Actually it already does try and match the Id property first, then it will fall back to doing a Label match if that isn't successful.


Actipro Software Support

Posted 13 years ago by Jan Ambroz
Avatar
Hi,

then I have to be doing something really wrong. If I don't change the language, QAT is persisted successfully. After changing it and restarting the app, QAT is empty. I looked at the XML it loads and Ids are stored fine, the same holds for Labels (except for the language of the text, which is different each time).

I will try to make a sample project tomorrow, if I have time. Maybe I will find the mistake I am making during the process.

Honza Ambroz.
Posted 13 years ago by Jan Ambroz
Avatar
Hi,

I tried to modify the XML serializer makes and removed the Label properties of the RibbonControlItemPath. The deserialization then wouldn't work at all. This makes me believe that the Id property is not used. Anything I try always ends up at the Label property and its value.

Jan Ambroz.
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Jan,

I apologize, I misread the logic yesterday. At the moment, if an Id is specified it still verifies the Label is a match too.

We've updated our code for the next version so that if an Id is specified, it will use that value alone in determining a match. Otherwise, if no Id is specified on either control, it will fall back to the Label match.


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.