diff --git a/blazor/image-editor/how-to/render-dialog.md b/blazor/image-editor/how-to/render-dialog.md index 45e1db9d6a..0eb0ac9f2b 100644 --- a/blazor/image-editor/how-to/render-dialog.md +++ b/blazor/image-editor/how-to/render-dialog.md @@ -1,7 +1,7 @@ --- layout: post -title: Clear an Image with Blazor Image Editor Component | Syncfusion -description: Learn here all about Clear an Image in Blazor Image Editor component in Blazor Server App and Blazor WebAssembly App. +title: Render Image Editor in a Dialog Component | Syncfusion +description: Render the Blazor Image Editor in a modal dialog for a focused, space-saving editing experience in Blazor Server and WebAssembly applications. platform: Blazor control: Image Editor documentation: ug @@ -9,7 +9,7 @@ documentation: ug # Render Image Editor in Dialog Component -Rendering the Image Editor in a dialog involves displaying the image editor component within a modal dialog window, allowing users to edit images in a pop-up interface. This can be useful for maintaining a clean layout and providing a focused editing experience without navigating away from the current page. +Rendering the Image Editor in a dialog displays the component within a modal window, enabling image editing in a pop-up interface. This approach helps maintain a clean layout and provides a focused editing experience without navigating away from the current page. ```cshtml @using Syncfusion.Blazor.ImageEditor @@ -18,49 +18,52 @@ Rendering the Image Editor in a dialog involves displaying the image editor comp @using Syncfusion.Blazor.Inputs
- @if (this.ShowButton) - { - Open Image - } + Edit Image
- - - -
- - -
-
-
- -
+
+ + + + +
+ @if (IsImageEditorOpened) + { + + + + } +
+
+
+
+
@code { - private bool Visibility { get; set; } = false; - private bool ShowButton { get; set; } = true; - SfImageEditor ImageEditor; + private bool IsDialogVisible { get; set; } = false; + private bool IsImageEditorOpened { get; set; } = false; + private SfImageEditor ImageEditor; - private async void OpenDialogAsync() - { - this.Visibility = true; + private void OpenDialog() + { + IsDialogVisible = true; } - private async void OpenAsync() - { - await ImageEditor.OpenAsync("https://ej2.syncfusion.com/react/demos/src/image-editor/images/bridge.png"); + private void OnDialogOpened() + { + IsImageEditorOpened = true; } - private void BeforeDialogOpen(BeforeOpenEventArgs args) + private void OnDialogClosed() { - this.ShowButton = false; + IsImageEditorOpened = false; } - private void DialogClosed(CloseEventArgs args) + private async void OnImageEditorCreated() { - this.ShowButton = true; + await ImageEditor.OpenAsync("https://ej2.syncfusion.com/react/demos/src/image-editor/images/bridge.png"); } } ``` -![Blazor Image Editor with Resize the custom selection](../images/blazor-image-editor-dialog.jpg) \ No newline at end of file +![Blazor Image Editor rendered in a dialog](../images/blazor-image-editor-dialog.jpg) \ No newline at end of file diff --git a/blazor/image-editor/images/blazor-image-editor-dialog.jpg b/blazor/image-editor/images/blazor-image-editor-dialog.jpg index d6c2ee7f1b..9a3a9b3546 100644 Binary files a/blazor/image-editor/images/blazor-image-editor-dialog.jpg and b/blazor/image-editor/images/blazor-image-editor-dialog.jpg differ