Access ApplicationBarInfo button

6 posts, 1 answers
  1. bento
    bento avatar
    35 posts
    Member since:
    Aug 2013

    Posted 24 Sep 2013 Link to this post

    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. 
  2. Answer
    Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 26 Sep 2013 Link to this post

    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.
  3. DevCraft banner
  4. bento
    bento avatar
    35 posts
    Member since:
    Aug 2013

    Posted 27 Sep 2013 Link to this post

    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. 
  5. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 01 Oct 2013 Link to this post

    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.
  6. Derik
    Derik avatar
    1 posts
    Member since:
    Aug 2013

    Posted 17 Mar 2014 in reply to Deyan Link to this post

    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.
  7. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 20 Mar 2014 Link to this post

    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.

     
Back to Top
DevCraft banner