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 have a few questions I'm hoping someone can answer.
1) I have a controlnode that hosts a usercontrol. I have set the background color of the usercontrol to transparent with the hopes that the background color of the diagram with be shown instead. However, this is not happening. Please see attachment. Can you give me any tips on how to make this happen?
2) What do I need to do in order to prevent line connectors from being selected or have focus? In my case the user should only be able to select the node but not the lines.
J.J.Nagarajan Syncfusion Team July 27, 2007 06:56 PM UTC
Hi GA,
Thanks for the update.
1. If you want to change the back color of the Windows control to Transparent then you could not change it to transparent. You can test this in an simple application. You can add a button control in a form and change the button's back color to transparent then it could not be changed to transparent. Similarly you can set transparent color to the control placed on a diagram. If you want to change the back color of the control node then please refer to the following code snippet
Button btn = new Button(); btn.Text = "Double Click to activate me"; btn.Click += new EventHandler( btn_Click );
ControlNode ctrlnode = new ControlNode( btn, new RectangleF( 100, 200, 150, 50 ) ); ctrlnode.HostingControl.BackColor = Color.Red; this.diagram1.Model.AppendChild( ctrlnode );
2. If you want to prevent the selection of the connector then you can set its AllowSelect property to false. Please refer to the folloing code.