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

Access ApplicationBarInfo button

5 Answers 42 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.
bento
Top achievements
Rank 2
bento asked on 24 Sep 2013, 07:15 PM
Hi,

How to access, I want to hide/show button of ApplicationBariInfo. try to use ApplicationBarInfo.Buttons[0].Visibility not works.

Thanks.

UPDATE : Actually I can access it when trying ApplicationBarInfo.Buttons[0].Text, but the Visibility property not works. So it still visible when I set Collapse. May be a bug. 

5 Answers, 1 is accepted

Sort by
0
Accepted
Deyan
Telerik team
answered on 26 Sep 2013, 03:02 PM
Hello Benyamin,

Thanks for writing.

The ApplicationBarInfo object is a one-time-initialization object which is used to define buttons and settings for the application bar which are used upon initial opening of the corresponding control. Changes to this object that happen consequently are not tracked.

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.
0
bento
Top achievements
Rank 2
answered on 27 Sep 2013, 01:00 PM
Ok, meaning I can't use RadWindow for dynamic ApplicationBar at opening, such scenario as when displaying RadDataBoundListBox will show OK and Cancel button, but when on IsCheckModeEnabled only show Delete button. 
0
Deyan
Telerik team
answered on 01 Oct 2013, 01:09 PM
Hi Benyamin,

You can implement this behavior. My point was that you cannot re-use the existing ApplicationBarInfo object and change its properties. We are yet to implement this functionality.

What you can do is initialize two different ApplicationBarInfo instance with different buttons and set them to the Window before opening it. That should work.

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.
0
Derik
Top achievements
Rank 1
answered on 17 Mar 2014, 04:20 PM
I have found the same issue.  I understand your (Telerik's) POV on this but i have to admit it totally sucks and means we have to do hacks to get stuff to work OR use non-native UX such as real buttons to get everything to work as expected.
0
Victor
Telerik team
answered on 20 Mar 2014, 07:53 AM
Hi Derik,

The FrameworkElement properties exposed by our application bar buttons are an unwanted side effect of a functionality that many users requested. They wanted to be able to set bindings on the properties of the app bar buttons. So we made the app bar info buttons to inherit from FrameworkElement. Now the bindings work as expected but the all the properties irrelevant to app bar do not work.

For example if you create a reference to the ApplicationBarIconButton class (the native app bar button) you will notice that it does not have a Visibility property. The window app bar info does not restrict what the native app bar does. So if you try to create your UI with the native app bar, you will still be unable to hide it like this. You will have to remove the button if it is to disappear completely. You can only disable the button with its IsEnabled property.

Thank you for understanding.

Regards,
Victor
Telerik
 

DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

 
Tags
Window
Asked by
bento
Top achievements
Rank 2
Answers by
Deyan
Telerik team
bento
Top achievements
Rank 2
Derik
Top achievements
Rank 1
Victor
Telerik team
Share this question
or