Skip to content

Commit 78e4412

Browse files
committed
986121- IE Blazor UG correction based on shared prompt
1 parent f2ce003 commit 78e4412

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed
Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
layout: post
3-
title: Clear an Image with Blazor Image Editor Component | Syncfusion
4-
description: Learn here all about Clear an Image in Blazor Image Editor component in Blazor Server App and Blazor WebAssembly App.
3+
title: Render Image Editor in a Dialog Component | Syncfusion
4+
description: Render the Blazor Image Editor in a modal dialog for a focused, space-saving editing experience in Blazor Server and WebAssembly applications.
55
platform: Blazor
66
control: Image Editor
77
documentation: ug
88
---
99

1010
# Render Image Editor in Dialog Component
1111

12-
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.
12+
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.
1313

1414
```cshtml
1515
@using Syncfusion.Blazor.ImageEditor
@@ -23,44 +23,45 @@ Rendering the Image Editor in a dialog involves displaying the image editor comp
2323
<SfButton OnClick="OpenDialogAsync">Open Image</SfButton>
2424
}
2525
</div>
26-
<SfDialog Height="75%" Width="435px" Target="#target" ShowCloseIcon="true" @bind-Visible="Visibility">
26+
27+
<SfDialog MinHeight="400px" Width="340px" Target="#target" ShowCloseIcon="true" @bind-Visible="Visibility">
2728
<DialogTemplates>
2829
<Content>
2930
<div class="dialogContent">
30-
<SfImageEditor @ref="ImageEditor" Height="400px">
31+
<SfImageEditor @ref="ImageEditor" Height="300px">
3132
</SfImageEditor>
3233
</div>
3334
</Content>
3435
</DialogTemplates>
3536
<DialogEvents OnOpen="@BeforeDialogOpen" Opened="OpenAsync" Closed="@DialogClosed"></DialogEvents>
36-
3737
</SfDialog>
3838
3939
@code {
4040
private bool Visibility { get; set; } = false;
4141
private bool ShowButton { get; set; } = true;
42-
SfImageEditor ImageEditor;
42+
SfImageEditor ImageEditor;
4343
44-
private async void OpenDialogAsync()
45-
{
44+
private void OpenDialogAsync()
45+
{
4646
this.Visibility = true;
4747
}
4848
49-
private async void OpenAsync()
50-
{
51-
await ImageEditor.OpenAsync("https://ej2.syncfusion.com/react/demos/src/image-editor/images/bridge.png");
49+
private async void OpenAsync()
50+
{
51+
await ImageEditor.OpenAsync("https://ej2.syncfusion.com/react/demos/src/image-editor/images/bridge.png");
52+
ImageEditor.RefreshAsync();
5253
}
5354
54-
private void BeforeDialogOpen(BeforeOpenEventArgs args)
55+
private void BeforeDialogOpen(Syncfusion.Blazor.Popups.BeforeOpenEventArgs args)
5556
{
5657
this.ShowButton = false;
5758
}
5859
59-
private void DialogClosed(CloseEventArgs args)
60+
private void DialogClosed(Syncfusion.Blazor.Popups.CloseEventArgs args)
6061
{
6162
this.ShowButton = true;
6263
}
6364
}
6465
```
6566

66-
![Blazor Image Editor with Resize the custom selection](../images/blazor-image-editor-dialog.jpg)
67+
![Blazor Image Editor rendered in a dialog](../images/blazor-image-editor-dialog.jpg)

0 commit comments

Comments
 (0)