Hi all,
When clicking the "Draw Shape", "Draw Text", etc, buttons on the image editor, is there a way to disable the pop up windows that comes up by default?
I don't want my users to be able to select the colors when they draw. Thank you.
3 Answers, 1 is accepted
0
Hello, Romel,
Note that most of the forum threads are reviewed by Telerik representatives and sometimes we address the questions asked by our customers in the forums as well. However, a post in the forum doesn't guarantee you a response from the Telerik support team. Moreover, threads are handled according to license and time of posting, so we suggest you using a support ticket, which would be handled before a forum thread and a reply from a Telerik support engineer is guaranteed.
As to the question at hand, when you click the 'Draw Shape' button, an appropriate dialog is shown, e.g. DrawShapeDialog. This behavior is controlled by the ShowDrawShapeDialog method of RadImageEditorElement. Hence, you can create a derivative of the RadImageEditorElement and override this method in order to control what dialog to be shown or whether to be shown. Then, create a custom RadImageEditor and replace the default RadImageEditorElement with the custom one in the CreateImageEditorElement method.
I hope this information helps. If you have any additional questions, please let me know.
Regards,
Dess
Progress TelerikRadImageEditor for Winforms
Note that most of the forum threads are reviewed by Telerik representatives and sometimes we address the questions asked by our customers in the forums as well. However, a post in the forum doesn't guarantee you a response from the Telerik support team. Moreover, threads are handled according to license and time of posting, so we suggest you using a support ticket, which would be handled before a forum thread and a reply from a Telerik support engineer is guaranteed.
As to the question at hand, when you click the 'Draw Shape' button, an appropriate dialog is shown, e.g. DrawShapeDialog. This behavior is controlled by the ShowDrawShapeDialog method of RadImageEditorElement. Hence, you can create a derivative of the RadImageEditorElement and override this method in order to control what dialog to be shown or whether to be shown. Then, create a custom RadImageEditor and replace the default RadImageEditorElement with the custom one in the CreateImageEditorElement method.
I hope this information helps. If you have any additional questions, please let me know.
Regards,
Dess
Progress TelerikRadImageEditor for Winforms
0

Romel
Top achievements
Rank 1
answered on 28 Jun 2018, 05:15 PM
Hi Dess,
Thanks again for the response. I kind of had an idea that I would have to override, but I just wanted to make sure that there wasn't a property that I could just enable/disable somewhere.... =)
So do I need to create a "custom" control, or can I go with a "user control"? Thank you.
0
Hello, Romel,
It is not necessary to create a UserControl. You can simply create the custom RadImageEditor as follows:
Then, in the Designer.cs replace the initialization of the RadImageEditor with the custom class.
I hope this information helps. If you have any additional questions, please let me know.
Regards,
Dess
Progress TelerikRadImageEditor for Winforms
It is not necessary to create a UserControl. You can simply create the custom RadImageEditor as follows:
public
class
CustomImageEditor : RadImageEditor
{
protected
override
RadImageEditorElement CreateImageEditorElement()
{
return
new
CustomRadImageEditorElement();
}
}
public
class
CustomRadImageEditorElement:RadImageEditorElement
{
public
override
void
ShowDrawShapeDialog()
{
//TODO
//prevent the basic logic in order to skip shoing the dialog
//base.ShowDrawShapeDialog();
}
}
Then, in the Designer.cs replace the initialization of the RadImageEditor with the custom class.
private
void
InitializeComponent()
{
this
.radImageEditor1 =
new
CustomImageEditor();
//other code
}
I hope this information helps. If you have any additional questions, please let me know.
Regards,
Dess
Progress TelerikRadImageEditor for Winforms