How to create a custom Command

2 posts, 0 answers
  1. Bacem
    Bacem avatar
    1 posts
    Member since:
    Sep 2013

    Posted 19 Jan 2014 Link to this post

    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

  2. Petya
    Admin
    Petya avatar
    975 posts

    Posted 22 Jan 2014 Link to this post

    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 >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top