arcadiog.CompositionExpressions 0.1.6

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

CompositionCollectionView

A composition-driven collection view control for UWP and WinUI 3 / Windows App SDK, with fully customizable layouts and behaviors powered by Windows.UI.Composition.

Features

  • Composition-powered animations — all element positioning, scaling, rotation, and opacity are driven by composition expression animations for smooth 60fps performance
  • Custom layouts — extend CompositionCollectionLayout<TId, TItem> to define how elements are positioned, scaled, and rotated
  • Animated layout transitions — smoothly animate between different layouts with TransitionTo()
  • Behaviors — attach reusable behaviors like InteractionTrackerBehavior for gesture-driven interactions
  • Interaction tracker gestures — define composable touch/pointer gestures with visual previews
  • Multi-platform — ships as a single NuGet package targeting both UWP (uap10.0.19041) and WinUI 3 (net9.0-windows10.0.19041.0)

Quick Start

<labs:CompositionCollectionView x:Name="collectionView"
                                Width="600" Height="200" />
// Define a simple horizontal layout
public class HorizontalLayout : CompositionCollectionLayout<uint, MyItem>
{
    public HorizontalLayout(Func<uint, FrameworkElement> factory) : base(factory) { }

    public override Vector3Node GetElementPositionNode(ElementReference<uint, MyItem> element)
        => ExpressionFunctions.Vector3(element.Id * 120, 0, 0);
}

// Create and use the layout
var layout = new HorizontalLayout(id => new MyItemControl());
collectionView.SetLayout(layout);
await collectionView.UpdateSource(myItems);

Solution Structure

CompositionCollectionView/
├── src/CompositionCollectionView/          # Control library (UWP + WinUI 3)
├── samples/
│   ├── CompositionCollectionView.Sample.Uwp/       # UWP sample app
│   └── CompositionCollectionView.Sample.WinUI3/    # WinUI 3 sample app

Building

Build with Visual Studio 2022+ or MSBuild:

msbuild CompositionCollectionView.sln /p:Platform=x64

Architecture

CompositionCollectionLayout

The core abstract class you extend to define layouts. Override these methods:

Method Purpose
GetElementPositionNode() Return an expression node for element position
GetElementScaleNode() Return an expression node for element scale
GetElementOpacityNode() Return an expression node for element opacity
GetElementOrientationNode() Return an expression node for element orientation
GetElementTransitionEasingFunction() Define transition animation easing

Behaviors

Attach CompositionCollectionLayoutBehavior<TId, TItem> instances to layouts for reusable functionality:

  • InteractionTrackerBehavior — wraps VisualInteractionSource + InteractionTracker for gesture handling
  • ElementInteractionTrackerBehavior — per-element interaction trackers
  • InteractionTrackerGesture — composable gesture definitions with visual previews

ExpressionsFork

An internal fork of the Windows Community Toolkit's expression animation helpers, with added Evaluate() method support.

License

MIT

Product Compatible and additional computed target framework versions.
.NET net10.0-windows10.0.19041 is compatible. 
Universal Windows Platform uap10.0.19041 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on arcadiog.CompositionExpressions:

Package Downloads
Combobulate

A XAML controls library for UWP and WinUI 3 / Windows App SDK.

CompositionCollectionView

A composition-driven collection view control for UWP and WinUI 3 / Windows App SDK, with fully customizable layouts and behaviors powered by Windows.UI.Composition.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.6 106 5/18/2026
0.1.5 119 5/14/2026
0.1.4 97 5/13/2026
0.1.3 123 5/5/2026