AppDimens.Net.Diagonal 3.6.0

dotnet add package AppDimens.Net.Diagonal --version 3.6.0
                    
NuGet\Install-Package AppDimens.Net.Diagonal -Version 3.6.0
                    
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.Diagonal" Version="3.6.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AppDimens.Net.Diagonal" Version="3.6.0" />
                    
Directory.Packages.props
<PackageReference Include="AppDimens.Net.Diagonal" />
                    
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.Diagonal --version 3.6.0
                    
#r "nuget: AppDimens.Net.Diagonal, 3.6.0"
                    
#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.Diagonal@3.6.0
                    
#: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.Diagonal&version=3.6.0
                    
Install as a Cake Addin
#tool nuget:?package=AppDimens.Net.Diagonal&version=3.6.0
                    
Install as a Cake Tool

<div align="center">

📐 AppDimens.Net.Diagonal

Diagonal scaling (DGSdp) — dimensions derived from the screen diagonal. Orientation-stable by design.

Part of the AppDimens for .NET family · requires AppDimens.Net (core).

NuGet License .NET

</div>


🎯 What is it?

The Diagonal strategy computes scale from the screen's diagonal (√(w²+h²)), exactly like physical screen sizes ("6.7-inch display"). Because rotation swaps w/h but preserves the diagonal, values stay stable between portrait and landscape — ideal for floating buttons, overlays and chrome that shouldn't jump on rotate.

📦 Installation

dotnet add package AppDimens.Net.Diagonal

Depends on AppDimens.Net (pulled automatically). Attach a MAUI window first or pass an explicit IAppDimensContext.

🚀 Quick start

using AppDimens.Net.Diagonal;

float fab   = 56.DGSdp();      // rotation-stable FAB
float sheet = 320.DGWdp(ctx);  // width variant
float ring  = 40.DGSdpaPx();   // px, aspect-ratio adjusted

🧭 API

Extension Result
v.DGSdp(ctx) · v.DGSdpa(ctx) diagonal lane (± aspect ratio)
v.DGHdp(ctx) · v.DGWdp(ctx) height / width variants
…i variants (DGSdpi…) ignore multi-window
v.DGSdpPx(ctx) pixel result
v.DGSdpCustom(qualifier, inverter, imw, ar, k) full control incl. sensitivity
DimenDiagonal.DGSdp(context, value) static form · WarmupCache(ctx) pre-heats
v.ToDiagonalDp/Px(v, ctx, …) generic kernel entry

💡 When to use

Scenario Recommendation
Rotation-invariant chrome ✅ Diagonal
Edge/gutter systems Perimeter
Axis-specific behavior core Scaled (Sdp/Hdp/Wdp)

⚡ Performance

Same engine as the core: snapshot-partitioned cache, allocation-free fast lanes, automatic invalidation on configuration changes.

📚 Full package family

AppDimens.Net · Percent · Power · Auto · Logarithmic · Fluid · Interpolated · Perimeter · Fill · Fit · Density · Resize · Units · Maui · Sdk meta-package


Apache-2.0 — © Jean Bodenberg · Repository · Formulas are bit-a-bit ports of appdimens-kmp

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.

NuGet packages (1)

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

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.

Version Downloads Last Updated
3.6.0 90 8/23/2026