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

Overriding or adding new commands for RadImageEditorUI

4 Answers 161 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Enric
Top achievements
Rank 1
Enric asked on 09 Sep 2013, 11:32 PM
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,

4 Answers, 1 is accepted

Sort by
0
Accepted
Petya
Telerik team
answered on 12 Sep 2013, 05:27 PM
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 >>
0
Enric
Top achievements
Rank 1
answered on 12 Sep 2013, 07:46 PM
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
0
Petya
Telerik team
answered on 17 Sep 2013, 10:57 AM
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 >>
0
Enric
Top achievements
Rank 1
answered on 17 Sep 2013, 03:14 PM
thanks a lot
Tags
General Discussions
Asked by
Enric
Top achievements
Rank 1
Answers by
Petya
Telerik team
Enric
Top achievements
Rank 1
Share this question
or