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.
Hello,
I have created a custom symbol, which is used on the diagram control. I have set some of the EditStyle propeties of this Symbol, such as AllowResize. Unfortunately, this doesnt work and the symbol is still resizeable.
I want to make this symbol a fixed size and would really like to be able to remove the 4 resizable squares that appear when the symbol is selected. I would also like to give the user the opportunity to move this symbol on the chart.
Here is the code which I have for the custom symbol, but like I said before, the node is still resizeable.
I hope somebody can help me with this.
Thanks,
David.
public class DemoNode : Symbol, ISerializable
{
public DemoNode(int xLoc, int yLoc)
{
Ellipse elip = new Ellipse(xLoc, yLoc, 15, 15);
this.LineStyle.LineWidth = 1;
elip.FillStyle.Type = Syncfusion.Windows.Forms.Diagram.FillStyleType.LinearGradient;
elip.FillStyle.ForeColor = System.Drawing.Color.Black;
elip.FillStyle.Color = System.Drawing.Color.Transparent;
this.EditStyle.AllowResize = false;
this.AppendChild(elip);
}
}
ADAdministrator Syncfusion Team July 18, 2006 03:50 AM UTC
Hi David,
Thank you for using Syncfusion products.
If your intension is not to allow the users from being resized, the way to go about this would be disable the EditStyle.AlloResize property within the Diagram.NodeClick event method. Kindly refer the following code snippet for your reference.
private void diagram_NodeClick(object sender, NodeMouseEventArgs evtArgs)
{
if(evtArgs.Node is DemoNode)
{
DemoNode empSym = evtArgs.Node as DemoNode ;
empSym.EditStyle.AllowResize = false;
}
}
Please let us know whether this helps you.
Thanks,
Meera.
DLDavid LlewellynJuly 18, 2006 06:29 AM UTC
Hello Meera,
Thank you, thats exactly what I was after. You''re the best!
Thank you,
David.