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

How to create a custom Command

1 Answer 32 Views
ImageEditor
This is a migrated thread and some comments may be shown as answers.
Bacem
Top achievements
Rank 1
Bacem asked on 19 Jan 2014, 03:11 PM
I want to implement my custom Command. So, I derived from IImageCommand and implement execute Method. And then, call my command from XAML code. But, when I run my application nothing is happened.
This is an example of what I have implemented :
public class MyCustomCommand : IImageCommand
    {
        public Telerik.Windows.Media.Imaging.RadBitmap Execute(Telerik.Windows.Media.Imaging.RadBitmap source, object context)
        {
            //My code here ....
        }
    }
and in my XAML file :
<telerik:ImageToolItem ImageKey="Custom" Text="Custom Command" Command="{Binding MyCustomCommand}"/>
Thank you very much for your responses. And it will be very helpful if there is an example showing how to create custom commands.

My warmest regards.
Bacem

1 Answer, 1 is accepted

Sort by
0
Petya
Telerik team
answered on 22 Jan 2014, 03:23 PM
Hi Bacem,

Thank you for your interest in RadImageEditor!

As far as I can tell, you are trying to create a custom tool of some sort. Please refer to this SDK example where a custom tool is implemented along with its respective command, context and tool settings.

I hope this helps! If you face any particular issues in implementing the desired scenario do not hesitate to contact us back.

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 >>
Tags
ImageEditor
Asked by
Bacem
Top achievements
Rank 1
Answers by
Petya
Telerik team
Share this question
or