This question is locked. New answers and comments are not allowed.
Hi,
For example, I opened an image and applied an effect to it.
How can I hide the image and settings panel?
In other words, I just want to reset image editor, like no image was opened.
Edit:
Here is an example how I did it. Is this the recommended way?
And on button click I execute this:
For example, I opened an image and applied an effect to it.
How can I hide the image and settings panel?
In other words, I just want to reset image editor, like no image was opened.
Edit:
Here is an example how I did it. Is this the recommended way?
public class RhResetImageEditorTool : ITool{ private RadImageEditor imageEditor; private Panel previewPanel; public bool AffectsLayout { get { return false; } } public void AttachUI(ToolInitInfo previewInitInfo) { this.imageEditor = previewInitInfo.ImageEditor; this.previewPanel = previewInitInfo.PreviewPanel; if (this.imageEditor.ToolSettingsContainer != null) { this.imageEditor.ToolSettingsContainer.Hide(); } this.imageEditor = null; this.previewPanel.Children.Clear(); this.previewPanel = null; } public void DetachUI() { } public IImageCommand GetCommand() { return new CropCommand(); } public object GetContext() { return new CropCommandContext(0, 0, 0, 0); } public System.Windows.UIElement GetSettingsUI() { return null; } public bool IsDirty { get { return false; } } public bool IsPreviewOverlay { get { return true; } } public void ResetSettings() { }}And on button click I execute this:
imageEditor.ExecuteTool(new RhResetImageEditorTool());<br>imageEditor.CommitTool();