AppDimens.Net.Fit
3.6.1
dotnet add package AppDimens.Net.Fit --version 3.6.1
NuGet\Install-Package AppDimens.Net.Fit -Version 3.6.1
<PackageReference Include="AppDimens.Net.Fit" Version="3.6.1" />
<PackageVersion Include="AppDimens.Net.Fit" Version="3.6.1" />
<PackageReference Include="AppDimens.Net.Fit" />
paket add AppDimens.Net.Fit --version 3.6.1
#r "nuget: AppDimens.Net.Fit, 3.6.1"
#:package AppDimens.Net.Fit@3.6.1
#addin nuget:?package=AppDimens.Net.Fit&version=3.6.1
#tool nuget:?package=AppDimens.Net.Fit&version=3.6.1
AppDimens.Net.Fit
DimenFit builder — one base value plus per-screen overrides (size class, orientation, UI mode).
Part of AppDimens for .NET · requires AppDimens.Net · MAUI, WPF, Windows Forms, WinUI 3, plain .NET (net8.0–net10.0).
📖 Complete guide: AppDimens.Net.Fit documentation · API reference: API.md
Install
dotnet add package AppDimens.Net.Fit
Use
using AppDimens.Net;
using AppDimens.Net.Code.Fit;
using AppDimens.Net.Common;
float paddingPx = 16.FitScaledDp()
.Screen(UiModeType.Television, 40) // 1st priority: UI mode
.Screen(DpQualifier.SmallWidth, 600, 24) // 2nd: size class (declare largest threshold first)
.Screen(Orientation.Landscape, 20) // 3rd: orientation
.ApplyAspectRatio()
.Ftsdp(); // pixels — also Fthdp(), Ftwdp(), ResolveAll(ctx)
float paddingDp = paddingPx / AppDimensAmbient.Require().Density; // dp for MAUI / WPF / WinUI
Português
Construtor de regras por tela: 16.FitScaledDp().Screen(DpQualifier.SmallWidth, 600, 24).Ftsdp() (retorna pixels).
Apache-2.0 — © Jean Bodenberg · Repository · Formulas are bit-for-bit ports of appdimens-kmp
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- AppDimens.Net (>= 3.6.1)
-
net8.0
- AppDimens.Net (>= 3.6.1)
-
net9.0
- AppDimens.Net (>= 3.6.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on AppDimens.Net.Fit:
| Package | Downloads |
|---|---|
|
AppDimens.Net.Sdk
AppDimens .NET meta-package ("BOM"): pulls the principal library plus every strategy module with a single reference. |
GitHub repositories
This package is not used by any popular GitHub repositories.