FloatPanel 1.0.0
dotnet add package FloatPanel --version 1.0.0
NuGet\Install-Package FloatPanel -Version 1.0.0
<PackageReference Include="FloatPanel" Version="1.0.0" />
<PackageVersion Include="FloatPanel" Version="1.0.0" />
<PackageReference Include="FloatPanel" />
paket add FloatPanel --version 1.0.0
#r "nuget: FloatPanel, 1.0.0"
#:package FloatPanel@1.0.0
#addin nuget:?package=FloatPanel&version=1.0.0
#tool nuget:?package=FloatPanel&version=1.0.0
FloatPanel
Introduce
Hi, I am ouse. Welcome to visit this repository. This repository features a highly practical layout control named FloatPanel.
🚀 What is FloatPanel?
FloatPanel is a responsive layout control designed for Avalonia UI. It is specifically built to handle "Pair" scenarios—such as Label-Value pairs or Title-Action buttons—where space efficiency is critical.
The control features intelligent adaptive logic:
- Horizontal Mode: When width is sufficient, content is placed side-by-side (Left and Right).
- Auto-Wrap: If the container becomes too narrow, it gracefully wraps the content into a vertical stack to prevent UI clipping or overlap.
✨ Key Features
Dual Spacing Control:
HorizontalSpacing: Precise control over the gap when items are side-by-side.VerticalSpacing: Precise control over the line gap after wrapping.Smart Measurement: Automatically recalculates layout height during wrapping to ensure a perfect fit.
Zero Configuration: Comes with a built-in programmatic style, meaning it works immediately without requiring external XAML ResourceDictionaries.
🛠 Usage
dotnet add package FloatPanel
You can use it directly in your XAML:
<FloatPanel HorizontalSpacing="20"
VerticalSpacing="12">
<FloatPanel.LeftContent>
<TextBlock Text="Project Name:" FontWeight="Bold"/>
</FloatPanel.LeftContent>
<FloatPanel.RightContent>
<TextBlock Text="Responsive Layout Engine" TextWrapping="Wrap"/>
</FloatPanel.RightContent>
</FloatPanel>
⚙️ Properties
| Property | Type | Default | Description |
|---|---|---|---|
| LeftContent | object |
null |
The content displayed on the left (or top). |
| RightContent | object |
null |
The content displayed on the right (or bottom). |
| HorizontalSpacing | double |
8.0 |
Gap between items in horizontal mode. |
| VerticalSpacing | double |
8.0 |
Gap between items in wrapped (vertical) mode. |
📖 Technical Logic
The control determines its state within the MeasureOverride pass:
Condition:
Layout Strategy:
- Success: Horizontal arrangement; Height = .
- Fail: Vertical arrangement; Total Height = .
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- Avalonia (>= 11.3.11)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 130 | 1/25/2026 |