Class DimAuto
Represents a dimension that automatically sizes the view to fit all the view's Content, SubViews, and/or Text.
public record DimAuto : Dim, IEqualityOperators<Dim, Dim, bool>, IEquatable<Dim>, IEquatable<DimAuto>
- Inheritance
-
DimAuto
- Implements
- Inherited Members
Remarks
See DimAutoStyle.
See the Dim.Auto Deep Dive for comprehensive documentation including non-trivial usage patterns.
SubViews that use DimFill do not contribute to the auto-sizing calculation unless
MinimumContentDim or To is specified. Without either, a
DimFill SubView will receive a size of 0 because the SuperView has no content-based size
to fill against. Use Fill(Dim, Dim?) with a minimumContentDim parameter or
Fill(View) with a to parameter to ensure the SubView contributes to the
auto-sizing calculation.
This is a low-level API that is typically used internally by the layout system. Use the various static methods on the Dim class to create Dim objects instead.
Constructors
- DimAuto(Dim?, Dim?, DimAutoStyle)
Represents a dimension that automatically sizes the view to fit all the view's Content, SubViews, and/or Text.
Properties
- MaximumContentDim
The maximum dimension the View's ContentSize will be fit to.
- MinimumContentDim
The minimum dimension the View's ContentSize will be constrained to.
- Style
The DimAutoStyle of the DimAuto.
Methods
- HasInner<TDim>(out TDim)
Searches nested Dim objects for the specified type. Override in subclasses that contain other Dim objects to enable Has<TDim>(out TDim) to find nested types.