AppDimens.Net 3.6.1

dotnet add package AppDimens.Net --version 3.6.1
                    
NuGet\Install-Package AppDimens.Net -Version 3.6.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AppDimens.Net" Version="3.6.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AppDimens.Net" Version="3.6.1" />
                    
Directory.Packages.props
<PackageReference Include="AppDimens.Net" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AppDimens.Net --version 3.6.1
                    
#r "nuget: AppDimens.Net, 3.6.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AppDimens.Net@3.6.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AppDimens.Net&version=3.6.1
                    
Install as a Cake Addin
#tool nuget:?package=AppDimens.Net&version=3.6.1
                    
Install as a Cake Tool

AppDimens.Net

Responsive dimensions for .NET — the core of AppDimens for .NET. Scaled dp/sp (16.Sdp(), 14.Ssp()), orientation inverters, conditional facilitators, builders, snapshot cache with allocation-free fast lanes, an event-driven resize watcher, HostDimensScope for any UI host and FakeAppDimensContext for tests. Bit-for-bit port of appdimens-kmp.

📖 Complete guide: AppDimens.Net documentation · API reference: API.md · All packages: docs index

Targets net8.0 · net9.0 · net10.0 (+ net11.0 with SDK 11)
Dependencies none
UI frameworks .NET MAUI (AppDimens.Net.Maui), WPF (AppDimens.Net.Wpf), Windows Forms (AppDimens.Net.WinForms), WinUI 3 (AppDimens.Net.WinUI), any other host (HostDimensScope)

Why?

Fixed sizes look right on one screen only. AppDimens treats your numbers as sizes on a 300 dp-wide reference screen and scales them to the real window: 16.Sdp() is 19.2 on a 360 dp phone, 32 on 600 dp, 48 on 900 dp.

Install

dotnet add package AppDimens.Net
# + your UI framework integration, e.g.
dotnet add package AppDimens.Net.Maui     # or .Wpf / .WinForms / .WinUI

Start (one line per framework)

Framework Call once
.NET MAUI AppDimensMaui.AttachWindow(window) in App.CreateWindow
WPF AppDimensWpf.Initialize(this) before InitializeComponent()
Windows Forms AppDimensWinForms.Initialize(this)
WinUI 3 AppDimensWinUI.Initialize(window) in OnLaunched
Any other host AppDimensHost.Activate(new HostDimensScope()).Update(widthDp, heightDp, density)

Use

using AppDimens.Net.Code.Scaled;

float pad    = 16.Sdp();    // smallest width — default for padding, margins, icons
float header = 56.Hdp();    // height axis
float side   = 200.Wdp();   // width axis
float text   = 14.Ssp();    // text, follows the user's font scale
float tall   = 16.Sdpa();   // + aspect-ratio correction
float split  = 16.Sdpi();   // ignores split-screen shrinking

float tablet = 16.ScaledDp()
    .Screen(AppDimens.Net.Common.DpQualifier.SmallWidth, 600, 24)   // sw ≥ 600 → 24
    .Sdp();

Test

using AppDimens.Net.Code.Scaled;
using AppDimens.Net.Testing;

var ctx = new FakeAppDimensContext();
ctx.SetConfig(360, 800);
float phone = 16.Sdp(ctx);   // 19.2

Português

dotnet add package AppDimens.Net + o pacote do seu framework → inicialize a janela uma vez → 16.Sdp() (tamanhos), 14.Ssp() (texto), 56.Hdp() / 200.Wdp() (altura/largura). Guia completo: docs/AppDimens.Net.


Apache-2.0 — © Jean Bodenberg · Repository

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages (18)

Showing the top 5 NuGet packages that depend on AppDimens.Net:

Package Downloads
AppDimens.Net.Fluid

AppDimens .NET — Fluid scaling strategy module.

AppDimens.Net.Percent

AppDimens .NET — Percent scaling strategy module.

AppDimens.Net.Fill

AppDimens .NET — Fill scaling strategy module.

AppDimens.Net.Resize

AppDimens .NET — Resize strategy module.

AppDimens.Net.Interpolated

AppDimens .NET — Interpolated scaling strategy module.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.6.1 319 10/12/2026
3.6.0 422 8/23/2026