FloatPanel 1.0.0

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

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:

  1. Condition:

  2. Layout Strategy:

  • Success: Horizontal arrangement; Height = .
  • Fail: Vertical arrangement; Total Height = .
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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