Skip to content

Commit 7795cc2

Browse files
authored
Merge pull request #7112 from syncfusion-content/986121-ie3
986121- IE Blazor UG correction based on shared prompt
2 parents ec65cda + 3fa5a87 commit 7795cc2

12 files changed

+61
-64
lines changed

blazor/image-editor/how-to/clear-image.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
layout: post
33
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.
4+
description: Learn how to clear an image in the Blazor Image Editor component for Blazor Server and WebAssembly applications.
55
platform: Blazor
66
control: Image Editor
77
documentation: ug
88
---
99

1010
# Clear an Image in the Blazor Image Editor component
1111

12-
The [`ClearImageAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.ImageEditor.SfImageEditor.html#Syncfusion_Blazor_ImageEditor_SfImageEditor_ClearImageAsync) method in the image editor control is indeed useful for scenarios where you need to ensure that the image editor is emptied before reopening it, especially if the editor is used within a dialog. By using `ClearImageAsync` before closing the dialog, you can ensure that the editor does not retain the previously loaded image when the dialog is reopened. This allows users to start fresh with a new image selection.
12+
The [ClearImageAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.ImageEditor.SfImageEditor.html#Syncfusion_Blazor_ImageEditor_SfImageEditor_ClearImageAsync) method clears the current image from the editor. This is useful when the component is rendered in a dialog: calling `ClearImageAsync` before closing the dialog prevents the previously loaded image from persisting when the dialog is reopened, ensuring a fresh state for a new selection.
1313

1414
```cshtml
1515
@using Syncfusion.Blazor.ImageEditor
@@ -37,4 +37,4 @@ The [`ClearImageAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.
3737
}
3838
```
3939

40-
![Blazor Image Editor with Resize the custom selection](../images/blazor-image-editor-clear-image.jpg)
40+
![Blazor Image Editor clearing the image](../images/blazor-image-editor-clear-image.jpg)
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)
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
layout: post
3-
title: Reset an Image with Blazor Image Editor Component | Syncfusion
4-
description: Learn here all about Reset an image in Blazor Image Editor component in Blazor Server App and Blazor WebAssembly App.
3+
title: Reset an image in the Blazor Image Editor | Syncfusion
4+
description: Learn how to reset an image in the Blazor Image Editor component for Blazor Server and WebAssembly applications.
55
platform: Blazor
66
control: Image Editor
77
documentation: ug
88
---
99

1010
# Reset an image in the Blazor Image Editor component
1111

12-
The [`ResetAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.ImageEditor.SfImageEditor.html#Syncfusion_Blazor_ImageEditor_SfImageEditor_ResetAsync) method in the Image Editor control provides the capability to undo all the changes made to an image and revert it back to its original state. This method is particularly useful when multiple adjustments, annotations, or transformations have been applied to an image and you want to start over with the original, unmodified version of the image.
12+
The [ResetAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.ImageEditor.SfImageEditor.html#Syncfusion_Blazor_ImageEditor_SfImageEditor_ResetAsync) method in the Image Editor control provides the capability to undo all changes made to an image and revert it to its original state. This method is particularly useful when multiple adjustments, annotations, or transformations have been applied to an image and a return to the original, unmodified version is required.
1313

14-
By invoking the `ResetAsync` method, any modifications or edits made to the image will be undone, and the image will be restored to its initial state. This allows you to easily discard any changes and begin again with the fresh, unaltered image.
14+
Invoking the `ResetAsync` method discards all modifications and restores the image to its initial state, enabling a clean restart of the editing process.
-3.83 KB
Loading
52.9 KB
Loading
-96.2 KB
Binary file not shown.
94.1 KB
Loading
-94.2 KB
Binary file not shown.
-2.83 KB
Loading

blazor/image-editor/resize.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
---
22
layout: post
33
title: Resizing with Blazor Image Editor Component | Syncfusion
4-
description: Checkout the Resizing available in Blazor Image Editor component in Blazor Server App and Blazor WebAssembly App.
4+
description: Explore the resizing support in the Blazor Image Editor component for Blazor Server and WebAssembly applications.
55
platform: Blazor
66
control: Image Editor
77
documentation: ug
88
---
99

1010
# Resize in the Blazor Image Editor component
1111

12-
The resize feature in an Image Editor is a valuable tool that empowers users to modify the size or dimensions of an image to meet their specific requirements. Whether it's for printing, web display, or any other purpose, this feature allows users to tailor images to their desired specifications.
12+
The resize feature adjusts the size or dimensions of an image to match specific requirements for printing, web display, or other use cases.
1313

1414
## Apply resize to the image
1515

16-
The Image Editor control includes a [`ImageResizeAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.ImageEditor.SfImageEditor.html#Syncfusion_Blazor_ImageEditor_SfImageEditor_ImageResizeAsync_System_Int32_System_Int32_System_Boolean_) method, which allows you to adjust the size of an image. This method takes three parameters that define how the resizing should be carried out:
16+
The Image Editor control provides the [`ImageResizeAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.ImageEditor.SfImageEditor.html#Syncfusion_Blazor_ImageEditor_SfImageEditor_ImageResizeAsync_System_Int32_System_Int32_System_Boolean_) method to change image size. This method accepts three parameters that define the resizing behavior:
1717

18-
* width: Specifies the resizing width of the image.
18+
- width: Sets the target width of the image.
1919

20-
* height: Specifies the resizing height of the image.
20+
- height: Sets the target height of the image.
2121

22-
* isAspectRatio: Specifies a boolean value indicating whether the image should maintain its original aspect ratio during resizing.
23-
* When set to `true`, the image maintains its original aspect ratio. The width is applied as specified, and the height is automatically adjusted to maintain the aspect ratio.
24-
* When set to `false`, the image is resized according to the specified width and height, without maintaining the aspect ratio.
25-
* The default value is `false`.
22+
- isAspectRatio: Indicates whether to preserve the original aspect ratio.
23+
- When `true`, the image maintains its original aspect ratio. The specified width is applied, and the height adjusts automatically.
24+
- When `false`, the image resizes to the specified width and height without preserving the aspect ratio.
25+
- The default value is `false`.
2626

27-
Here is an example of resizing the image using the `ImageResizeAsync` method.
27+
Here is an example of resizing the image using the `ImageResizeAsync` method.
2828

2929
```cshtml
3030
@using Syncfusion.Blazor.ImageEditor
@@ -60,22 +60,22 @@ Here is an example of resizing the image using the `ImageResizeAsync` method.
6060
}
6161
```
6262

63-
![Blazor Image Editor with Resize an image](./images/blazor-image-editor-resize.png)
63+
![Blazor Image Editor with a resized image](./images/blazor-image-editor-resize.jpg)
6464

6565
## Resizing event
6666

67-
The [`ImageResizing`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.ImageEditor.ImageEditorEvents.html#Syncfusion_Blazor_ImageEditor_ImageEditorEvents_ImageResizing) event is triggered when resizing the image. This event provides information encapsulated within an object, which includes details about the previous and current height and width of an image.
67+
The [`ImageResizing`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.ImageEditor.ImageEditorEvents.html#Syncfusion_Blazor_ImageEditor_ImageEditorEvents_ImageResizing) event triggers while an image is being resized and provides details about the previous and current dimensions.
6868

69-
The parameter available in ResizeEventArgs is,
69+
Parameters available in [ImageResizeEventArgs](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.ImageEditor.ImageResizeEventArgs.html):
7070

71-
* [`ImageResizeEventArgs.PreviousWidth`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.ImageEditor.ImageResizeEventArgs.html#Syncfusion_Blazor_ImageEditor_ImageResizeEventArgs_PreviousWidth) - The width of the image before resizing is performed.
71+
- [`ImageResizeEventArgs.PreviousWidth`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.ImageEditor.ImageResizeEventArgs.html#Syncfusion_Blazor_ImageEditor_ImageResizeEventArgs_PreviousWidth) The width of the image before resizing.
7272

73-
* [`ImageResizeEventArgs.PreviousHeight`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.ImageEditor.ImageResizeEventArgs.html#Syncfusion_Blazor_ImageEditor_ImageResizeEventArgs_PreviousHeight) - The height of the image before resizing is performed.
73+
- [`ImageResizeEventArgs.PreviousHeight`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.ImageEditor.ImageResizeEventArgs.html#Syncfusion_Blazor_ImageEditor_ImageResizeEventArgs_PreviousHeight) The height of the image before resizing.
7474

75-
* [`ImageResizeEventArgs.Width`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.ImageEditor.ImageResizeEventArgs.html#Syncfusion_Blazor_ImageEditor_ImageResizeEventArgs_Width) - The width of the image after resizing is performed.
75+
- [`ImageResizeEventArgs.Width`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.ImageEditor.ImageResizeEventArgs.html#Syncfusion_Blazor_ImageEditor_ImageResizeEventArgs_Width) The width of the image after resizing.
7676

77-
* [`ImageResizeEventArgs.Height`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.ImageEditor.ImageResizeEventArgs.html#Syncfusion_Blazor_ImageEditor_ImageResizeEventArgs_Height) - The width of the image after resizing is performed.
77+
- [`ImageResizeEventArgs.Height`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.ImageEditor.ImageResizeEventArgs.html#Syncfusion_Blazor_ImageEditor_ImageResizeEventArgs_Height) The height of the image after resizing.
7878

79-
* [`ImageResizeEventArgs.IsAspectRatio`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.ImageEditor.ImageResizeEventArgs.html#Syncfusion_Blazor_ImageEditor_ImageResizeEventArgs_IsAspectRatio) - The type of resizing performed such as aspect ratio or non-aspect ratio.
79+
- [`ImageResizeEventArgs.IsAspectRatio`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.ImageEditor.ImageResizeEventArgs.html#Syncfusion_Blazor_ImageEditor_ImageResizeEventArgs_IsAspectRatio) – Indicates whether the resizing preserved the aspect ratio.
8080

81-
* [`ImageResizeEventArgs.Cancel`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.ImageEditor.ImageResizeEventArgs.html#Syncfusion_Blazor_ImageEditor_ImageResizeEventArgs_Cancel) - Specifies a boolean value to cancel the resizing action.
81+
- [`ImageResizeEventArgs.Cancel`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.ImageEditor.ImageResizeEventArgs.html#Syncfusion_Blazor_ImageEditor_ImageResizeEventArgs_Cancel) – A boolean value that cancels the resizing action when set to true.

0 commit comments

Comments
 (0)