RadRibbonBar Minimization

12 posts, 1 answers
  1. Robin
    Robin avatar
    30 posts
    Member since:
    Jun 2012

    Posted 05 Jun 2012 Link to this post

    Hi,

    I'm trying to minimize a RadRibbonBar using the IsMinimized-Property:
    protected void RadButtonBar_Click(object sender, EventArgs e)
        {       
            radRibbonBar.IsMinimized = true;
        }
    (as described in http://www.telerik.com/help/wpf/radribbonbar-features-minimization.html)

    However, I get an error-message "CS0117", telling me that "IsMinimized" is not defined in "Telerik.Web.UI.RadRibbonBar".

    Thanks in advance,
    Robin
  2. Answer
    Kate
    Admin
    Kate avatar
    1898 posts

    Posted 06 Jun 2012 Link to this post

    Hello Robin,

    The article that you refer to (http://www.telerik.com/help/wpf/radribbonbar-features-minimization.html) is related to the WPF controls and not the ASP.NET AJAX ones. If you need to use the minimize property of the RadRibbonBar you need to set both the EnableMinimizing and Minimize properties as explained at bottom the following help article:
    http://www.telerik.com/help/aspnet-ajax/ribbonbar-structure.html

    Regards,
    Kate
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Peter From LA
    Peter From LA avatar
    35 posts
    Member since:
    May 2005

    Posted 02 Jul 2012 Link to this post

    What are the client-side command for controlling the minimizing of the RibbonBar - the documentation is a bit behind...

    P
  5. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 03 Jul 2012 Link to this post

    Hi Peter,

    Following are the client side functions that controls minimizing of RadRibbonBar.

    JS:
    <script type="text/javascript">
        function OnClientLoad(sender, args) {
            var ribbonbar = sender;
            ribbonbar._enableMinimizing = true;
            ribbonbar.minimize();
            ribbonbar.get_minimized();
            ribbonbar.maximize();
            ribbonbar.set_minimized(true);
        }
    </script>

    Hope this helps.

    Thanks,
    Princy.

  6. Peter From LA
    Peter From LA avatar
    35 posts
    Member since:
    May 2005

    Posted 04 Jul 2012 Link to this post

    Thank you, Princy...
    I am still a bit confused what is the difference between
    ribbon.set_minimized(true)
     and
    ribbon.minimize();

    They both appear to be working during my limited testing, but is there anything hidden that could be benefitial in either case?

    P
  7. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 04 Jul 2012 Link to this post

    Hi Peter,

    As far a I know set_minimized(true) and minimize() function perform the same functionality. After checking these methods using debugger I found out that these functions performs as follows.

    1) set_minimized(true)
    function(N){if(!this._enableMinimizing||this._minimized==N){return;}this._minimized=N;this._setButtonAreaVisibility(!N);
    this.updateClientState();}

    2) minimize()
    function(){this.set_minimized(true);}

    Hope this helps.

    Thanks,
    Princy.
  8. Peter From LA
    Peter From LA avatar
    35 posts
    Member since:
    May 2005

    Posted 05 Jul 2012 Link to this post

    Thank you very much...

    Looking at your response I see that I could control the visibility of the expand/collapse button with "private" functions - do you know if there is an "authorized" way to do that?
    In my settup the collapsing/expanding is done by a different user action, so access to the button would be a bit confusing and will just give the users something else to play with other than the buttons I let them have.
  9. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 10 Jul 2012 Link to this post

    Hello Peter,

    My best suggestion would be to enable the minimize/maximize functionality of the RadPanelBar control either in the markup of the server-side of your page (using the EnableMinimizing="true" property). Then, you can easily manipulate it with either the set_minimized()/set_maximized() or minimize()/maximize() functions by using the desired event.

    Considering the differences between the two properties - minimize(); and set_minimized(true); - we decided to implement both of them for simplicity purposes. As you can see from the code that Princy provided, by calling the minimize() function you actually call the set_minimized(true)

    All the best,
    Kate
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  10. Peter From LA
    Peter From LA avatar
    35 posts
    Member since:
    May 2005

    Posted 10 Jul 2012 Link to this post

    Hi, Kate,

    thank you for the detailed explanation, but this still does not answer the question about what is the "prescribed" way to control the collapse/expand button visibility...

    I am sure I can dig deeper into the internal workings of the ribbon and find a way to do it, but that means I will have to revisit the code every time a new DLL's are released, just to make sure all is still working...

    P
  11. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 12 Jul 2012 Link to this post

    Hello Peter,

    Unfortunately since the minimize/maximize properties of the RadRibbonBar control are new to the control, we have not implemented an authorized way to enable/disable the handler. However, I already forwarded your request to our developers so that they can include it in the future improvements of the control.

    Regards,
    Kate
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  12. Peter From LA
    Peter From LA avatar
    35 posts
    Member since:
    May 2005

    Posted 12 Jul 2012 Link to this post

    Thank you, Kate,

    You, guys, are great...  :)
    Hey, since we are talking about new features, how about a way to hide/show groups in the ribbon... Currently I am doing it by manipulating the styles of the HTML element, but does not feel right...  :)

    P
  13. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 16 Jul 2012 Link to this post

    Hi Peter,

    Thank you very much for your suggestion. Unfortunately, when we implemented the RadRibbonbar control we tried to create it by following the Microsoft's specification of the control. Therefore we have not considered the case that you describe in your previous reply. However, I will forward your request to our development team but I can not promise that we will implement this feature for the RadRibbonbar due to the initial concept of the control.

    All the best,
    Kate
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017