protected override Size OnMeasure(Size availableSize) { Size labelSize = m_Label.Measure(availableSize); Size radioButtonSize = m_CheckBox.Measure(availableSize); return(new Size(labelSize.Width + 4 + radioButtonSize.Width, Math.Max(labelSize.Height, radioButtonSize.Height))); }
protected override Size OnMeasure(Size availableSize) { Properties parent = Parent as Properties; if (parent != null) { Size labelSize = m_Label.Measure(new Size(parent.LabelWidth - Padding.Left - Padding.Right, availableSize.Height)) + Padding; Size propertySize = m_Property.Measure(new Size(availableSize.Width - parent.LabelWidth, availableSize.Height)) + Padding; return(new Size(labelSize.Width + propertySize.Width, Math.Max(labelSize.Height, propertySize.Height))); } return(Size.Zero); }
protected override Size OnMeasure(Size availableSize) { Size size = base.OnMeasure(availableSize); if (m_Accelerator != null) { Size accSize = m_Accelerator.Measure(availableSize); size.Width += accSize.Width; } if (m_SubmenuArrow != null) { m_SubmenuArrow.Measure(availableSize); } return(size); }