Hi Christine Cipriani,
Thanks for the update,
Sorry for the delay in getting back to you.
1) The Port class used to have a Visible property so you could show/hide individual ports. That property does not exist in the ConnectionPoint class. Is there a way to do this?
Currently the feature is not available in diagram for 'Show/Hide Individual Ports'. we have consider this as a feature request. Please create an DT incident for your query so that we can update with the fix for this feature.
You can create the DT incident from the following link.
http://www.syncfusion.com/account/dashboardIn the interests of maintaining confidentiality, we have a policy of not sharing patches or otherwise proprietary customer specific information in the public Forum.
2) We also used the SetPropertyValue to add additional properties to the property container. How can this be done with the latest version?
Sorry for the inconvenience caused. In the latest version we don't have a property called SetProprtyValue() for creating custom property. So we suggest you to create custom property for the symbol.Please refer the below code snippet to achieve this,
[C#]
[Serializable()]
[TypeConverter(typeof(GLEConverter))]
public partial class MySymbol : Group
{
public string myProperty = @"MyChildControlProperty";
public string m_symbolDescription = @"My UserControl";
public MySymbol()
{
Syncfusion.Windows.Forms.Diagram.Rectangle rect = new Syncfusion.Windows.Forms.Diagram.Rectangle(100, 100, 100, 100);
rect.FillStyle.Color = Color.BlueViolet;
this.AppendChild(rect);
}
public MySymbol(MySymbol src)
: base(src)
{
}
//Clones this instance.
public override object Clone()
{
return new MySymbol(this);
}
#region Symbol properties for property editor
[
Browsable(true),
Category("MyProperty"),
Description("Custom Property"),
DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)
]
public string MyProperty
{
get { return myProperty; }
set
{
myProperty = value;
}
}
[
Browsable(true),
Category("MyProperty"),
Description("My Property for Symbol"),
DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)
]
public string Description
{
get
{
return this.m_symbolDescription;
}
set
{
this.m_symbolDescription = value;
}
}
#endregion
private void button1_Click(object sender, EventArgs e)
{
}
}
public class GLEConverter : TypeConverter
{
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
{
return base.ConvertTo(context, culture, value, destinationType);
}
public override bool GetPropertiesSupported(ITypeDescriptorContext context)
{
return true;
}
public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes)
{
Attribute[] attrs = new Attribute[]
{
new BrowsableAttribute(true)
};
PropertyDescriptor[] props = null;
Type type = value.GetType();
switch (type.Name)
{
case "MySymbol":
props = new PropertyDescriptor[3];
props[0] = TypeDescriptor.CreateProperty(typeof(MySymbol), "MyProperty", typeof(string), attrs);
props[1] = TypeDescriptor.CreateProperty(typeof(MySymbol), "Description", typeof(string), attrs);
props[2] = TypeDescriptor.CreateProperty(typeof(MySymbol), "Size", typeof(SizeF), attrs);
break;
default:
break;
}
return new PropertyDescriptorCollection(props);
}
}
we have created a simple sample to demonstrate this and the same can be downloaded from the below link,
http://www.syncfusion.com/uploads/redirect.aspx?team=support&file=SymbolProperty708434951.zipPlease let me know if you have any concerns.
Regards,
Bala Murugan A.S