Exemplo n.º 1
0
        protected override Size Measure(Size availableSize)
        {
            Size labelSize       = m_Label.DoMeasure(availableSize);
            Size radioButtonSize = m_CheckBox.DoMeasure(availableSize);

            return(new Size(labelSize.Width + 4 + radioButtonSize.Width, Math.Max(labelSize.Height, radioButtonSize.Height)));
        }
Exemplo n.º 2
0
        protected override Size Measure(Size availableSize)
        {
            Properties parent = Parent as Properties;

            if (parent != null)
            {
                Size labelSize    = m_Label.DoMeasure(new Size(parent.LabelWidth - Padding.Left - Padding.Right, availableSize.Height)) + Padding;
                Size propertySize = m_Property.DoMeasure(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);
        }
Exemplo n.º 3
0
        protected override Size Measure(Size availableSize)
        {
            Size size = base.Measure(availableSize);

            if (m_Accelerator != null)
            {
                Size accSize = m_Accelerator.DoMeasure(availableSize);
                size.Width += accSize.Width;
            }
            if (m_SubmenuArrow != null)
            {
                m_SubmenuArrow.DoMeasure(availableSize);
            }

            return(size);
        }