The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi,
I am trying to use and evaluate the Diagram tool.
I need to Insert an Image when I show the Diagram on the Form.
There are 2 problems that I am facing.
1. I have the following code.
private void ShowImage(Image image)
{
System.IO.Stream str = new MemoryStream();
image.Save(str, ImageFormat.Jpeg);
Tool tool = diagram1.Controller.GetTool("ImageTool");
diagram1.Controller.ActivateTool(tool);
this.diagram1.InsertImage(str);
}
Unless and untill the user clicks on the Diagram the image is not inserted.
I need to automatically show the image.
something like this
RoundRect r = new RoundRect(100,100,100,100);
diagram1.Model.AppendChild(r);
Is there anything equivalent to this for Images?
2.Irrespective of the current zoom in the diagram, I want the image to be inserted as if the zoom is 100%
Can anyone help me out with this?
Thanks in Advance.
Nisha
Oooops... I got it :)
BitmapNode was my answer.
>Hi,
>I am trying to use and evaluate the Diagram tool.
>I need to Insert an Image when I show the Diagram on the Form.
>There are 2 problems that I am facing.
>1. I have the following code.
>private void ShowImage(Image image)
>{
> System.IO.Stream str = new MemoryStream();
> image.Save(str, ImageFormat.Jpeg);
> Tool tool = diagram1.Controller.GetTool("ImageTool");
> diagram1.Controller.ActivateTool(tool);
> this.diagram1.InsertImage(str);
>}
>Unless and untill the user clicks on the Diagram the image is not inserted.
>I need to automatically show the image.
>something like this
> RoundRect r = new RoundRect(100,100,100,100);
> diagram1.Model.AppendChild(r);
>Is there anything equivalent to this for Images?
>
>2.Irrespective of the current zoom in the diagram, I want the image to be inserted as if the zoom is 100%
>
>Can anyone help me out with this?
>
>Thanks in Advance.
>
>Nisha
>