using System.ComponentModel; namespace WindowsFormsApplication1 { public class CustomPanel: Label { private CustomProperties _DisplayCustomProperties; [Browsable(true),Category("Appearance"), DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public CustomProperties DisplayCustomProperties { get { return _DisplayCustomProperties; } set { _DisplayCustomProperties = value; } } } }
using System; using System.Collections.Generic; using System.Text; using System.ComponentModel; namespace WindowsFormsApplication1 { public abstract class CustomProperties { public enum ArrowColor { Red, Green, Magenta, Pink, Orange, Black, Yellow }; protected CustomPanel _cpl; public CustomProperties(CustomPanel cpl) { this._cpl = cpl; } private ArrowColor _CustomForeColor; [Browsable(true), Category("Appearance")] public ArrowColor CustomForeColor{ get { return _CustomForeColor; } set { _CustomForeColor = value; } } } }