Hide Toolbar on left hand side

6 posts, 0 answers
  1. Romel
    Romel avatar
    20 posts
    Member since:
    May 2012

    Posted 22 Jun 2018 Link to this post

    Hi all,

    I just downloaded the Telerik UI for Winforms 2018_2_621 and started "tinkering" around with the RadImageEditor control for a specific project I am currently working on for work. I was wondering, is there a way to "hide" or "disable" the buttons on the toolbar on the left hand side of the image editor? Or (perhaps the most ideal for me) is there a way to completely hide the toolbar altogether on the left hand side?

    I thought this would be a simple "enable" or "disable" on a property of the control, but I can't seem to find any documentation on this matter. Thank you and I look forward to the response.

  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3212 posts

    Posted 25 Jun 2018 Link to this post

    Hello, Romel,   

    In order to hide completely the left toolbar of RadImageEditor, you should simply set the ImageEditorElement.CommandsElement.Visibility property to Collapsed.

    this.radImageEditor1.ImageEditorElement.CommandsElement.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;

    I hope this information helps. If you have any additional questions, please let me know. 

    Regards,
    Dess
    Progress TelerikRadImageEditor for Winforms
  3. Romel
    Romel avatar
    20 posts
    Member since:
    May 2012

    Posted 25 Jun 2018 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Hi, thank you very much for the reply. That worked great. Now, there was a change in requirements and it may seem to be more easier if I only hide certain elements in the tool bar, would that be possible? I seem to be to get access to the top 4 buttons(undo, redo, open, save) on the tool bar by doing something like this:

    this.radImageEditor1.ImageEditorElement.CommandsElement.UndoButton.Visibility = ElementVisibility.Collapsed;

    How do I get access to the other buttons on the "Transform" section? I would also prefer to just completely hide the "Adjust" and "Effects" section, as I don't see a need for this for us.

    Thanks again very much and I look forward to your response.

     

  4. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3212 posts

    Posted 26 Jun 2018 Link to this post

    Hello, Romel,   

    All menu items on the left commands panel are stored in the ImageEditorElement.CommandsElement.CommandsStackElement. In order to hide any item you wish, it is necessary to iterate its Children collection and change the Visibility of the respective item. Here is a sample code snippet demonstrating how to hide completely the "Resize" and "Crop" items:
    foreach (var item in this.radImageEditor1.ImageEditorElement.CommandsElement.CommandsStackElement.Children)
    {
        RadMenuItem menuItem = item as RadMenuItem;
        if (menuItem != null && (menuItem.Text == "Resize"||menuItem.Text=="Crop"))
        {
            menuItem.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
        }
    }

    I hope this information helps. If you have any additional questions, please let me know. 

    Regards,
    Dess
    Progress TelerikRadImageEditor for Winforms
  5. Romel
    Romel avatar
    20 posts
    Member since:
    May 2012

    Posted 27 Jun 2018 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Dess, thank you once again. The code snippet worked well for me. Is there a documentation I can view somewhere besides the one on the Telerik/Progress website? The one on the website does not seem to provide enough info about the Image Editor, and only contains "basic" simple documentation on it.... =) I suspect that this is because the tool is still quite new? Anyways, thanks again and if you can point me to a better documentation, that would be great.

    I have another question on the image editor, but I started a new thread for that since it is on a different behavior/functionality. Thanks

  6. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3212 posts

    Posted 28 Jun 2018 Link to this post

    Hello, Romel,   

    The provided feedback it greatly appreciated. We will consider improving the documentation related to RadImageEditor. However, it would be greatly appreciated if you can share with us what kind of information to be included. We always strive to consider our customers' feedback in order to update the official resources accordingly.

    In addition, note that our Demo application is also an official resource which demonstrates the features of each control in our suite. It can be found in the installation folder of the suite at the following path: C:\Program Files (x86)\Progress\Telerik UI for WinForms R2 2018\Examples\QuickStart\Bin

    I hope this information helps. If you have any additional questions, please let me know. 

    Regards,
    Dess
    Progress TelerikRadImageEditor for Winforms
Back to Top