public virtual Size GetTextSize(Size proposedSize) { return Size.Empty; }
Size GetPreferredSizeCore( Size proposedSize ) { int linearBorderAndPadding = ((this.borderSize * 2) + (this.paddingSize * 2)); if (this.growBorderBy1PxWhenDefault) { linearBorderAndPadding += 2; } Size bordersAndPadding = new Size(linearBorderAndPadding, linearBorderAndPadding); proposedSize = Size.Subtract(proposedSize, bordersAndPadding); int checkSizeLinear = this.FullCheckSize; Size checkSize = (checkSizeLinear > 0) ? new Size(checkSizeLinear + 1, checkSizeLinear) : Size.Empty; Size textImageInsetSize = new Size(this.textImageInset * 2, this.textImageInset * 2); Size requiredImageSize = (!Size.AreEqual(this.imageSize, Size.Empty)) ? Size.Add(this.imageSize, textImageInsetSize) : Size.Empty; proposedSize = Size.Subtract(proposedSize, textImageInsetSize); proposedSize = this.Decompose(checkSize, requiredImageSize, proposedSize); Size textSize = Size.Empty; if (!string.IsNullOrEmpty(this.text)) { try { this.disableWordWrapping = true; textSize = Size.Add(this.GetTextSize(proposedSize), textImageInsetSize); } finally { this.disableWordWrapping = false; } } Size requiredSize = this.Compose(checkSize, this.imageSize, textSize); requiredSize = Size.Add(requiredSize, bordersAndPadding); return requiredSize; }
public Size Decompose(Size checkSize, Size requiredImageSize, Size proposedSize) { return Size.Empty; }
public Size Compose(Size checkSize, Size imageSize, Size textSize) { return Size.Empty; }
public static bool AreEqual(Size sz1, Size sz2) { return ((sz1.width == sz2.width) && (sz1.height == sz2.height)); }
public static Size Add(Size sz1, Size sz2) { return Size.Empty; }
public static Size Subtract(Size sz1, Size sz2) { return Size.Empty; }