Overriding or adding new commands for RadImageEditorUI

5 posts, 1 answers
  1. Enric
    Enric avatar
    32 posts
    Member since:
    Apr 2013

    Posted 09 Sep 2013 Link to this post

    hi there,

    I would need more power with this control. I mean, being able to show more buttons would be great. I wonder, is it possible?
    My aim is display a button where the user can save the images and their later treatment against my RDBMS (Sql2k8)

    Also I would fancy show a Context Menu on the bare surface of the control.

    Telerik 2013 Q1 NET 4.5 for WPF.

    Thanks in advance,
  2. Answer
    Petya
    Admin
    Petya avatar
    975 posts

    Posted 12 Sep 2013 Link to this post

    Hi,

    You can modify the way RadImageEditorUI looks in several ways. For example, you can add custom tools you've implemented in ImageToolsSections. There is a demo project in our click-once example which shows how this can be achieved (you an also find it here for SIlverlight, but the code-base is the same). 

    I'm not sure what exactly you are trying to achieve, but in case you want to modify the behavior of the default save command you can do that by inheriting from ImageEditorCommandBase. The attached project demonstrates how a custom save command can be implemented and used. 

    In case you wish to create custom tools you can implement the ITool interface for the actual tool and the IImageCommand interface for the custom tool. A sample project demonstrating the approach can be found here.

    As for creating a context menu, I suggest you refer to the documentation of RadContextMenu. It is fairly simple to create the menu and bind it to the default commands of RadImageEditor. Here is a simple example:
    <telerik:RadImageEditorUI x:Name="ImageEditorUI" >           
          <telerik:RadContextMenu.ContextMenu>
              <telerik:RadContextMenu>
                  <telerik:RadMenuItem Header="Save" Command="commands:ImageEditorRoutedCommands.Save" />
                  <telerik:RadMenuItem Header="ResizeTool" Command="commands:ImageEditorRoutedCommands.ExecuteTool" >
                      <telerik:RadMenuItem.CommandParameter>
                          <tools:ResizeTool />
                      </telerik:RadMenuItem.CommandParameter>
                  </telerik:RadMenuItem>
              </telerik:RadContextMenu>
          </telerik:RadContextMenu.ContextMenu>
      </telerik:RadImageEditorUI>
    The approach when binding to a custom command should be similar.

    I hope the provided information is helpful! Let us know if you have any other comments or questions.

    Regards,
    Petya
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Enric
    Enric avatar
    32 posts
    Member since:
    Apr 2013

    Posted 12 Sep 2013 Link to this post

    Hi Petyas,

    First of all thanks for your response and your attachment, now, it's working properly.

    Well, I was thinking in one wonderful thing: including the main features for Hot Spot graphical treatment in your control.

    I suppose it is not possible.

    It would be amazing to have available in just one control all these things.

    P.D: I wanted to attach you one sample in .zip format but I can't. am I only allowed to upload JPG, PNG files?

    Anyway, just check this url, it is a SilverLight stuff but it would be a good approx: http://www.damonpayne.com/HotSpot/HotSpotDesigner.html
  5. Petya
    Admin
    Petya avatar
    975 posts

    Posted 17 Sep 2013 Link to this post

    Hi,

    Thank you for your feedback! We will consider the request, however I cannot say if and when such changes might be implemented.

    Regards,
    Petya
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  6. Enric
    Enric avatar
    32 posts
    Member since:
    Apr 2013

    Posted 17 Sep 2013 Link to this post

    thanks a lot
Back to Top
UI for WPF is Visual Studio 2017 Ready