Shirasagi0012.MaterialShapes 0.1.4

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

Material Shape for Avalonia

androidx\graphics\graphics-shapes ported to Avalonia.

This module is maintained in the Material3Expressive repository and referenced directly by its projects. Package versions and publishing are described in the root README.

Features

  • Material 3 Expressive Shapes Access the complete set of predefined Material 3 shapes, or customize your own shapes.
  • Shape Morphing Create smooth, high-performance animations that morph between any two arbitrary shapes.
  • Avalonia Integration:
    • Generate standard Avalonia Geometry objects for custom use.
    • Use MaterialShapeView to render static shapes.
    • Use MorphShapeView to implement morphing animations between two shapes.

Geometry conversion

RoundedPolygon.ToGeometry() and Morph.ToGeometry(progress) mirror androidx's compose/material3/internal/ShapeUtil.kt, including its startAngle, repeatPath and closePath parameters.

Two deviations, both deliberate:

  • startAngle defaults to 0 here, not 270. Upstream's toPath is internal and every caller re-centres the result, so its default is harmless there. On a public API a non-zero default would silently rotate — and, since the rotation is about the origin rather than the shape's centre, translate — every shape drawn through it. Pass AvaloniaExtensions.StartAngleTop when porting material3 drawing code.
  • The rotation is applied about the origin, exactly as upstream does; the pivot only decides where the first anchor's angle is measured from.

Known limitations

  • MorphShapeView builds a fresh StreamGeometry for every Progress change, i.e. once per frame while morphing. This is not an oversight: Avalonia 12's StreamGeometry has no rewind — _strokePath is readonly and re-Open()ing appends — so a geometry cannot be rebuilt in place. Avoiding the per-frame allocation means dropping to a custom draw operation with a reused SKPath, which trades away the non-Skia backends.

You can explore the capabilities and play with different Material Shapes by building and running the included Gallery App.

<img width="656" height="1035" alt="MaterialShape.Gallery Demo" src="https://github.com/user-attachments/assets/ea687ad3-3101-4d48-8ed7-ae572550dafd" />

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 (1)

Showing the top 1 NuGet packages that depend on Shirasagi0012.MaterialShapes:

Package Downloads
Shirasagi0012.Material3Expressive.Avalonia

Material 3 Expressive theme and controls for Avalonia, ported from Compose Material3.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.4 115 11/7/2026
0.1.3-alpha 98 11/3/2026