/// <summary> /// Initializes a new instance of the <see cref="PropertyRow" /> class. /// </summary> /// <param name="parent">Parent control.</param> /// <param name="prop">Property control associated with this row.</param> public PropertyRow(Base parent, Property.Base prop) : base(parent) { var label = new PropertyRowLabel(this); label.Dock = Pos.Left; label.Alignment = Pos.Left | Pos.Top; label.Margin = new Margin(2, 2, 0, 0); mLabel = label; mProperty = prop; mProperty.Parent = this; mProperty.Dock = Pos.Fill; mProperty.ValueChanged += OnValueChanged; }
/// <summary> /// Initializes a new instance of the <see cref="PropertyRow"/> class. /// </summary> /// <param name="parent">Parent control.</param> /// <param name="prop">Property control associated with this row.</param> public PropertyRow(ControlBase parent, Property.PropertyBase prop) : base(parent) { PropertyRowLabel label = new PropertyRowLabel(this); label.Dock = Pos.Left; label.Alignment = Pos.Left | Pos.Top; label.Margin = new Margin(2, 2, 0, 0); this.label = label; property = prop; property.Parent = this; property.Dock = Pos.Fill; property.ValueChanged += onValueChanged; }
/// <summary> /// Initializes a new instance of the <see cref="PropertyRow"/> class. /// </summary> /// <param name="parent">Parent control.</param> /// <param name="prop">Property control associated with this row.</param> public PropertyRow(ControlBase parent, PropertyBase prop) : base(parent) { m_Label = new PropertyRowLabel(this); m_Label.Dock = Dock.Left; m_Label.Alignment = Pos.Left | Pos.Top; m_Label.Margin = new Margin(2, 2, 0, 2); m_Label.AutoSizeToContents = false; m_Property = prop; m_Property.Dock = Dock.Fill; m_Property.Parent = this; m_Property.Margin = new Margin(1, 0, 0, 1); m_Property.ValueChanged += OnValueChanged; m_Property.ToolTipProvider = false; SizeToChildren(false, true); AutoSizeToContents = true; }