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.
I have a custom symbol that has a control node. However, I don''t want to display the control property in the property editor so I added the Browsable(false) attribute to my property. When I do this, the control is not created when I drag/drop my symbol. Instead, the control is not created until I click on either the symbol or the diagram. I tried this with the CustomListSymbol in the ControlsGalore sample and the same thing happens when I add the Browsable(false) attribute to the ListBoxControl property. How can I get the control node created when I drag/drop the symbol?
Thanks in advance for your help.
Chris C.
ADAdministrator Syncfusion Team December 19, 2005 10:09 PM UTC
Hi Chris,
The Essential Diagram ControlNode type was failing to automatically create the child control for nodes for which the control data was being provided by the ControlNodeInfo event. In such cases it was the PropertyGrid''s attempt to display the child control''s properties that was forcing the control to get instantiated, and turning off the Browsable attribute was resulting in the child control not being created until a subsequent refresh.
We have added a fix for the problem, and the next version of Essential Diagram will include the fix. For the time being you can workaround the condition by forcing the ControlNode to create the child control from within your ControlNodeInfo event handler. The following code should give you an idea,
private void diagram1_ControlNodeInfo(object sender, Syncfusion.Windows.Forms.Diagram.ControlNodeEventArgs evtArgs)
{
if(evtArgs.EventInfo == ControlNodeEventInfo.GetChildControl)
{
if(evtArgs.Node.Parent is CustomListSymbol)
{
ControlNode ctrlnode = evtArgs.Node as ControlNode;
ctrlnode.ControlAssemblyName = typeof(ControlsGalore.Form1).Assembly.FullName;
ctrlnode.ControlClassName = "ControlsGalore.CustomListBox";
// Force the control to create itself
ctrlnode.CreateControl();
}
}
}
Thank you for bringing this problem to our attention.
Prakash Surendra
Syncfusion Inc.,
CCChris CDecember 20, 2005 02:26 AM UTC
Hi Prakash,
Thanks once again for your quick response. The workaround you provided solved the problem.
What is the anticipated release date for the next version of Essential Diagram?
Chris