Dynamically adding AppBar buttons to a RadWindow

2 posts, 0 answers
  1. Damian
    Damian avatar
    1 posts
    Member since:
    Aug 2013

    Posted 20 Aug 2013 Link to this post

    I am trying to dynamically add buttons to a RadWindow AppBar and they are not being updated in the UI.

    My code looks like this:
    var appBarButton = (ApplicationBarButton)Resources["LoginAppBarButton"];
    if (appBarButton == null) return;
    LoginRadWindow.ApplicationBarInfo.Buttons.Add(appBarButton);

    Where I have a resource set for the ApplicationBarButton ("LoginAppBarButton") and the LoginRadWindow is the RadWindow control.

    The above code runs fine and I get the button added to the collection however this is not reflected on the UI so the button doesn't actually appear.

    Is there a way to dynamically add AppBarButtons to the RadWindow AppBar?
  2. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 23 Aug 2013 Link to this post

    Hi Damian,

    Thanks for writing.

    Are you adding the buttons while the Window is already opened? If yes - that will not work. You should add the buttons before opening the Window to make sure they are displayed.

    Regards,
    Deyan
    Telerik
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  3. DevCraft banner
Back to Top