Browse Source

Made GetMaxSizeFromConstraint a protected method (#20877)

pull/20892/head
Melissa 2 weeks ago
committed by GitHub
parent
commit
7d90094455
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      src/Avalonia.Controls/TextBlock.cs

5
src/Avalonia.Controls/TextBlock.cs

@ -363,7 +363,10 @@ namespace Avalonia.Controls
internal bool HasComplexContent => Inlines != null && Inlines.Count > 0;
private protected Size GetMaxSizeFromConstraint()
/// <summary>
/// Gets the maximum available size based on the constraint of the control
/// </summary>
protected Size GetMaxSizeFromConstraint()
{
var maxWidth = double.IsNaN(_constraint.Width) ? 0.0 : _constraint.Width;
var maxHeight = double.IsNaN(_constraint.Height) ? 0.0 : _constraint.Height;

Loading…
Cancel
Save