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

Dynamically adding AppBar buttons to a RadWindow

1 Answer 36 Views
Window
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Damian
Top achievements
Rank 1
Damian asked on 21 Aug 2013, 04:58 AM
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?

1 Answer, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 23 Aug 2013, 08:21 AM
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.
Tags
Window
Asked by
Damian
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Share this question
or