Exemplo n.º 1
0
        public override Size GetPreferredSize(Size constrainingSize)
        {
            // dont call TextBox.GPS because it will grow and shrink as the text changes.
            Rectangle bounds = CommonProperties.GetSpecifiedBounds(TextBox);

            return(new Size(bounds.Width, TextBox.PreferredHeight));
        }
Exemplo n.º 2
0
        internal override Size GetPreferredSizeCore(Size proposedSize)
        {
            if (this.image == null)
            {
                return(CommonProperties.GetSpecifiedBounds(this).Size);
            }
            Size size = this.SizeFromClientSize(Size.Empty) + base.Padding.Size;

            return(this.image.Size + size);
        }
Exemplo n.º 3
0
 public override Size GetPreferredSize(Size constrainingSize)
 {
     return(new Size(CommonProperties.GetSpecifiedBounds(this.TextBox).Width, this.TextBox.PreferredHeight));
 }
 internal override Size GetPreferredSizeCore(Size proposedConstraints)
 {
     return(new Size(CommonProperties.GetSpecifiedBounds(this).Width, this.PreferredHeight));
 }