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

Preselect a tool

1 Answer 39 Views
ImageEditor
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Igor
Top achievements
Rank 1
Igor asked on 14 Jun 2014, 05:05 PM
I'm trying to use your cropping tool inside ImageEditor. It's the only tool I need and use at the moment, and I don't want the user to have to click twice to get to it. How do I preselect CropTool programmatically?

I tried setting IsSelected = true which sets the blue line above the tool icon but does not open straight to cropping.

1 Answer, 1 is accepted

Sort by
0
Rosy Topchiyska
Telerik team
answered on 18 Jun 2014, 11:57 AM
Hi Igor,

Thank you for contacting us.

You can use the RadImageEditor.CurrentTool property and set it when the RadImageEditor control is loaded:

<telerikImageEditor:RadImageEditor Loaded="ImageEditor_Loaded">
    <telerikImageEditor:CropTool>
        <telerikImageEditor:CropToolRatio Width="1" Height="1"/>
    </telerikImageEditor:CropTool>
</telerikImageEditor:RadImageEditor>
private void ImageEditor_Loaded(object sender, RoutedEventArgs e)
{
    var editor = sender as RadImageEditor;
    editor.CurrentTool = editor.Tools.First();
}

I hope this helps. Please, let us know if you have further questions.

Regards,
Rosy Topchiyska
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
ImageEditor
Asked by
Igor
Top achievements
Rank 1
Answers by
Rosy Topchiyska
Telerik team
Share this question
or