BoxConstraints 構造体
レイアウトで許容する幅と高さの範囲を論理ピクセル単位で表す不変値です。
名前空間: FloatSoda.Geometrics
アセンブリ: FloatSoda.dll
public readonly record struct BoxConstraints : IEquatable<BoxConstraints>実装するインターフェイス
Section titled “実装するインターフェイス”継承したメンバー
Section titled “継承したメンバー”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
コンストラクター
Section titled “コンストラクター”BoxConstraints(double, double, double, double)
Section titled “BoxConstraints(double, double, double, double)”レイアウトで許容する幅と高さの範囲を論理ピクセル単位で表す不変値です。
public BoxConstraints(double MinWidth = 0, double MaxWidth = Infinity, double MinHeight = 0, double MaxHeight = Infinity)パラメーター
Section titled “パラメーター”MinWidth double
許容する最小幅。既定値は0です。
MaxWidth double
許容する最大幅。既定値は正の無限大です。
MinHeight double
許容する最小高さ。既定値は0です。
MaxHeight double
許容する最大高さ。既定値は正の無限大です。
HasTightHeight
Section titled “HasTightHeight”高さの下限が上限以上であり、自由に選べる高さがないかを取得します。
public bool HasTightHeight { get; }プロパティの値
Section titled “プロパティの値”HasTightWidth
Section titled “HasTightWidth”幅の下限が上限以上であり、自由に選べる幅がないかを取得します。
public bool HasTightWidth { get; }プロパティの値
Section titled “プロパティの値”IsTight
Section titled “IsTight”幅と高さの両方について自由に選べる大きさがないかを取得します。
public bool IsTight { get; }プロパティの値
Section titled “プロパティの値”Loosen
Section titled “Loosen”最大値を維持したまま、幅と高さの最小値を0にした制約を取得します。
public BoxConstraints Loosen { get; }プロパティの値
Section titled “プロパティの値”MaxHeight
Section titled “MaxHeight”許容する最大高さ。既定値は正の無限大です。
public double MaxHeight { get; init; }プロパティの値
Section titled “プロパティの値”MaxWidth
Section titled “MaxWidth”許容する最大幅。既定値は正の無限大です。
public double MaxWidth { get; init; }プロパティの値
Section titled “プロパティの値”MinHeight
Section titled “MinHeight”許容する最小高さ。既定値は0です。
public double MinHeight { get; init; }プロパティの値
Section titled “プロパティの値”MinWidth
Section titled “MinWidth”許容する最小幅。既定値は0です。
public double MinWidth { get; init; }プロパティの値
Section titled “プロパティの値”Smallest
Section titled “Smallest”この制約が許容する最小のサイズを取得します。
public SKSize Smallest { get; }プロパティの値
Section titled “プロパティの値”いずれかの最小値が対応する最大値を上回っています。
Unbounded
Section titled “Unbounded”下限0・上限無限の完全に緩い制約。子はコンテンツサイズに収縮(shrink-wrap)します。
(default(BoxConstraints) は全て0になるため、無限上限が必要な場合はこれを使うこと)
public static BoxConstraints Unbounded { get; }プロパティの値
Section titled “プロパティの値”Constrain(SKSize)
Section titled “Constrain(SKSize)”指定サイズをこの制約が許容する範囲内へ収めます。
public SKSize Constrain(SKSize size)パラメーター
Section titled “パラメーター”size SKSize
制約する論理ピクセル単位のサイズ。
各軸を許容範囲内へ収めたサイズ。
いずれかの最小値が対応する最大値を上回っています。
Constrain(double, double)
Section titled “Constrain(double, double)”指定された幅と高さをこの制約が許容する範囲内へ収めます。
public SKSize Constrain(double width, double height)パラメーター
Section titled “パラメーター”width double
制約する論理ピクセル単位の幅。
height double
制約する論理ピクセル単位の高さ。
各軸を許容範囲内へ収めたサイズ。
いずれかの最小値が対応する最大値を上回っています。
ConstrainHeight(double)
Section titled “ConstrainHeight(double)”高さをこの制約の最小高さと最大高さの範囲内へ収めます。
public double ConstrainHeight(double height)パラメーター
Section titled “パラメーター”height double
制約する論理ピクセル単位の高さ。
許容範囲内へ収めた高さ。
ConstrainWidth(double)
Section titled “ConstrainWidth(double)”幅をこの制約の最小幅と最大幅の範囲内へ収めます。
public double ConstrainWidth(double width)パラメーター
Section titled “パラメーター”width double
制約する論理ピクセル単位の幅。
許容範囲内へ収めた幅。
Enforce(BoxConstraints)
Section titled “Enforce(BoxConstraints)”この制約の各境界値を、指定された制約が許容する範囲内へ収めます。
public BoxConstraints Enforce(BoxConstraints constraints)パラメーター
Section titled “パラメーター”constraints BoxConstraints
各境界値の下限と上限として適用する制約。
各境界値を指定範囲内へ収めた新しい制約。
constraintsのいずれかの最小値が対応する最大値を上回っています。
Loose(double, double)
Section titled “Loose(double, double)”最小値を0とし、指定値までを許容する緩い制約を作成します。
public static BoxConstraints Loose(double width, double height)パラメーター
Section titled “パラメーター”width double
許容する論理ピクセル単位の最大幅。
height double
許容する論理ピクセル単位の最大高さ。
最小値が0で最大値が指定値の制約。
Loose(SKSize)
Section titled “Loose(SKSize)”最小値を0とし、指定サイズまでを許容する緩い制約を作成します。
public static BoxConstraints Loose(SKSize size)パラメーター
Section titled “パラメーター”size SKSize
許容する論理ピクセル単位の最大サイズ。
最小値が0で最大値が指定サイズの制約。
Tight(SKSize)
Section titled “Tight(SKSize)”幅と高さを指定サイズへ固定する制約を作成します。
public static BoxConstraints Tight(SKSize size)パラメーター
Section titled “パラメーター”size SKSize
固定する論理ピクセル単位の大きさ。
最小値と最大値が指定サイズに等しい制約。
Tight(double, double)
Section titled “Tight(double, double)”幅と高さを指定値へ固定する制約を作成します。
public static BoxConstraints Tight(double width, double height)パラメーター
Section titled “パラメーター”width double
固定する論理ピクセル単位の幅。
height double
固定する論理ピクセル単位の高さ。
最小値と最大値が指定値に等しい制約。
TightFor(double?, double?)
Section titled “TightFor(double?, double?)”指定された軸だけを固定し、未指定の軸を制限しない制約を作成します。
public static BoxConstraints TightFor(double? width = null, double? height = null)パラメーター
Section titled “パラメーター”width double?
固定する論理ピクセル単位の幅。nullの場合は幅を固定しません。
height double?
固定する論理ピクセル単位の高さ。nullの場合は高さを固定しません。
指定された軸だけが固定された制約。
ToString()
Section titled “ToString()”Returns the fully qualified type name of this instance.
public override string ToString()The fully qualified type name.