This is a migrated thread and some comments may be shown as answers.

Custom backstage datacontext issue

1 Answer 107 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
Maurício
Top achievements
Rank 1
Maurício asked on 05 Aug 2014, 06:14 PM
Hello!

The datacontext of my custom RadRibbonBackstage changes after the ribbonview is fully loaded.

Doesn't matter if I set it's datacontext before or after the InitializeComponent() call in the constructor, I even tried to set it through xaml.

For now I can set the datacontext in the Loaded+= event of my backstage, but seems a crappy solution. I would like to know if this is a correct behavior of the control, or if I am doing something wrong.

I have attached a project where youll be able to easily reproduce the situation, change the extension from png to zip.

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 08 Aug 2014, 08:17 AM
Hello MaurĂ­cio,

The DataContext of the backstage is null because it is set internally in the RadRibbonView code. We set the binding in code because the RadRibbonBackstage element is located in a separate AdronerLayer element and the ribbon's DataContext cannot propagate to the backstage.

You current solution where you set the DataContext in the Loaded event is good.

I hope this information helps.

Regards,
Martin
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
RibbonView and RibbonWindow
Asked by
Maurício
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or