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.
Need to be able to change the bitmap in the selected node on mouse click to simulate an on off state.(light switch / lamp etc.) I can trap the events. just need help for changing the bitmap if it is even possible thanks...
PMPandi Murugan A Syncfusion Team April 19, 2011 07:03 AM UTC
Hi Tom,
Thanks for using Syncfusion products.
We suggest you to set the BitmapNode's Image property to achieve your requirements. Please refer the below code snippet. [C#] private void Form1_Load(object sender, EventArgs e) { BitmapNode bmpNode = new BitmapNode(@"..\\..\\desert.jpg"); bmpNode.Size = new SizeF(200, 100); bmpNode.PinPoint = new PointF(300, 100); diagram1.Model.AppendChild(bmpNode); //add event for nodeclick diagram1.EventSink.NodeClick += new NodeMouseEventHandler(EventSink_NodeClick); }
void EventSink_NodeClick(NodeMouseEventArgs evtArgs) { if (evtArgs.Node != null && evtArgs.Node is BitmapNode) { //Change the bitmap ((BitmapNode)evtArgs.Node).Image = new Bitmap(@"..\\..\\koala.jpg"); } }
Please let me know if you have any concerns.
Regards, Pandi Murugan A
VIvinodkumar March 3, 2018 03:28 PM UTC
yes
NGNaganathan Ganesh Babu Syncfusion Team March 5, 2018 04:59 AM UTC
Hi Tom,
Thanks for the update please let us know whether you need any further assistance