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.
ADAdministrator Syncfusion Team April 6, 2005 04:03 PM UTC
Hi Swati,
Yes, it is possible to set an image as the background for the DiagramWebControl.
The DiagramWebControl shares its architecture with the Windows Forms version of the product, and most of the functionality available in the Windows version of Essential Diagram is available in the Web Control as well.
The following code shows how to set a background image for the Diagram Web Control,
// The Web Forms Page.Load event handler
private void Page_Load(object sender, System.EventArgs e)
{
if(this.IsPostBack == false)
{
// To Set a background image for the DiagramWebControl...
// First create a Bitmap object for the background image
string path = Server.MapPath("/syncfusion/");
path = path + @"\Web\Diagram.Web\Samples\ScriptyClient\CS\bin\suiteimage.jpg";
System.Drawing.Bitmap background = new Bitmap(path);
// Now assign the image to the diagram model''s BackgroundStyle property
this.DiagramWebControl1.Model.BackgroundStyle.Type = BackgroundStyle.BackgroundType.Texture;
this.DiagramWebControl1.Model.BackgroundStyle.TextureWrapMode = System.Drawing.Drawing2D.WrapMode.Tile;
this.DiagramWebControl1.Model.BackgroundStyle.Texture = background;
}
}
Prakash Surendra
Syncfusion Inc.,