AppDimens.Net.Percent 3.6.1

dotnet add package AppDimens.Net.Percent --version 3.6.1
                    
NuGet\Install-Package AppDimens.Net.Percent -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.Percent" 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.Percent" Version="3.6.1" />
                    
Directory.Packages.props
<PackageReference Include="AppDimens.Net.Percent" />
                    
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.Percent --version 3.6.1
                    
#r "nuget: AppDimens.Net.Percent, 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.Percent@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.Percent&version=3.6.1
                    
Install as a Cake Addin
#tool nuget:?package=AppDimens.Net.Percent&version=3.6.1
                    
Install as a Cake Tool

AppDimens.Net.Percent

Percent scaling — strictly proportional to an axis, plus Space helpers for literal percentages.

Part of AppDimens for .NET (C# port of appdimens-kmp) · requires AppDimens.Net (installed automatically). Works with .NET MAUI, WPF, Windows Forms, WinUI 3 and plain .NET (net8.0 / net9.0 / net10.0).

📖 Complete guide: AppDimens.Net.Percent documentation · API reference: API.md

What it does

The Percent strategy scales linearly with the chosen axis (value × axis ÷ 300): PSdp follows the smaller side, PHdp the height and PWdp the width. It also ships the Space helpers for literal percentages of the window: 50.SpaceWDp(ctx) = 50 % of the width, 50.SpaceHDp(ctx) = 50 % of the height, 25.SpaceSwDp(ctx) = 25 % of the smaller side.

16 with this strategy Phone 360×800 Tablet 800×1280 Desktop 1280×800
16.PSdp() 19.2 42.7 42.7
16.PHdp() 42.7 68.3 42.7
16.PWdp() 19.2 42.7 68.3
16.Sdp() (core Scaled) 19.2 42.7 42.7

Install

dotnet add package AppDimens.Net.Percent

Use

  1. Initialize once for your UI framework: MAUI AppDimensMaui.AttachWindow(window) · WPF AppDimensWpf.Initialize(this) · WinForms AppDimensWinForms.Initialize(this) · WinUI AppDimensWinUI.Initialize(window).
  2. Call the extensions:
using AppDimens.Net.Code.Percent;

float padding = 16.PSdp();    // smaller side of the window
float header  = 56.PHdp();    // height
float sidebar = 200.PWdp();   // width
float tall    = 16.PSdpa();   // + aspect-ratio correction
float split   = 16.PSdpi();   // ignores split-screen shrinking

With an explicit context: 16.PSdp(ctx), 16.PSdpPx(ctx), DimenPercent.PSdp(ctx, 16), 24.ToPercentDp(ctx, qualifier: DpQualifier.Width).

Português

dotnet add package AppDimens.Net.Percent → inicialize a janela uma vez → using AppDimens.Net.Code.Percent; → 16.PSdp(), 56.PHdp(), 200.PWdp(). Guia completo: https://github.com/bodenberg/appdimens-net-binding/blob/main/docs/AppDimens.Net.Percent/README.md


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.

NuGet packages (5)

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

Package Downloads
AppDimens.Net.Maui

AppDimens .NET — .NET MAUI integration: live window scopes, event-driven resize watcher, XAML markup extensions and converters.

AppDimens.Net.Sdk

AppDimens .NET meta-package ("BOM"): pulls the principal library plus every strategy module with a single reference.

AppDimens.Net.Wpf

AppDimens .NET — WPF integration: window scope that follows size and per-monitor DPI, live {ad:Sdp 16} XAML markup extensions (scaled, fluid, percent) and value converters.

AppDimens.Net.WinUI

AppDimens .NET — WinUI 3 (Windows App SDK) integration: window scope that follows size and scale, {ad:Sdp Value=16} XAML markup re-applied on resize, and value converters.

AppDimens.Net.WinForms

AppDimens .NET — Windows Forms integration: form scope that follows client size and per-monitor DPI, Apply(...) re-layout helper and dp → pixel / point converters.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.6.1 121 10/12/2026
3.6.0 162 8/23/2026