We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Always use same layout

Hi Wich is the best way to ensure that all UI components look the same ? I have a custom GDBG but the BaseStyleMap gets always serialized when I drop my grid on a form or control. I tried ShouldSerializeBaseStylesMap (return False) but this didn''t work. The GDBG serializes too much code in the parent container wich makes later changes difficult without editing every form/usercontrol.

1 Reply

ST stanleyj Syncfusion Team December 26, 2005 04:45 AM UTC

Hi Krijn, This serialization to code can be avoided by overriding the respective properties and set it to DesignerSerializationVisibility.Hidden. As an example RangeStyles being serialized to code can be avoided by overriding RangeStyles and set it to DesignerSerializationVisibility.Hidden. C# [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public new GridRangeStyleCollection RangeStyles { get { return base.RangeStyles; } set { base.RangeStyles = value; } } VB Public Shadows Property RangeStyles() As GridRangeStyleCollection Get Return MyBase.RangeStyles End Get Set MyBase.RangeStyles = Value End Set End Property Same with RowHeightEntries and ColWidthEntries. Let me know if your requirement is different. Best regards, Stanley

Loader.
Live Chat Icon For mobile
Up arrow icon