Custom backstage datacontext issue

2 posts, 0 answers
  1. Maurício
    Maurício avatar
    42 posts
    Member since:
    Jan 2011

    Posted 05 Aug 2014 Link to this post


    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.
  2. Martin Ivanov
    Martin Ivanov avatar
    2425 posts

    Posted 08 Aug 2014 Link to this post

    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.

    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.
Back to Top