Skip to main content

Overview

This guide covers migration paths for:
  • Flowery.NET (Avalonia)Flowery.Uno (Uno Platform / WinUI)
  • Earlier Flowery.Uno versionsLatest version

Migrating from Flowery.NET

Platform Differences

Flowery.NET targets Avalonia UI, while Flowery.Uno targets Uno Platform (WinUI). Key differences:
AspectFlowery.NET (Avalonia)Flowery.Uno (Uno/WinUI)
Base FrameworkAvalonia UIUno Platform / WinUI
XAML Namespacexmlns:daisy="using:Flowery.Controls"xmlns:daisy="using:Flowery.Controls" (same)
Control Base ClassesAvalonia controlsWinUI controls
Styling SystemAvalonia stylesWinUI lightweight styling
Threading ModelAvalonia DispatcherWinUI DispatcherQueue
Target PlatformsWindows, macOS, LinuxWindows, iOS, Android, WASM, macOS, Linux

Control Name Mapping

Most control names are identical between Flowery.NET and Flowery.Uno:
<!-- Both frameworks use same control names -->
<daisy:DaisyButton Content="Click Me" Variant="Primary" />
<daisy:DaisyInput PlaceholderText="Type here" Variant="Bordered" />
<daisy:DaisyCard>
    <TextBlock Text="Card Content" />
</daisy:DaisyCard>

Key Differences

  1. Base Control Properties: Some WinUI-specific properties may differ from Avalonia equivalents
  2. Event Names: WinUI uses Click instead of Avalonia’s Click (usually the same, but verify)
  3. Resource System: Avalonia uses DynamicResource, WinUI uses ThemeResource

XAML Syntax Changes

Resource References

Avalonia (Flowery.NET):
<Border Background="{DynamicResource DaisyBase200Brush}">
    <TextBlock Foreground="{DynamicResource DaisyBaseContentBrush}" />
</Border>
Uno Platform (Flowery.Uno):
<Border Background="{ThemeResource DaisyBase200Brush}">
    <TextBlock Foreground="{ThemeResource DaisyBaseContentBrush}" />
</Border>

Data Binding

Avalonia:
<daisy:DaisyButton Content="{Binding ButtonText}" />
Uno Platform (with x:Bind):
<daisy:DaisyButton Content="{x:Bind ViewModel.ButtonText, Mode=OneWay}" />
WinUI/Uno supports both {Binding} (runtime) and {x:Bind} (compile-time). Prefer x:Bind for better performance.

Theming System Changes

Theme Application

Avalonia (Flowery.NET):
// Avalonia uses ResourceDictionary merging
Application.Current.Styles.Add(new DaisyTheme { Theme = "Synthwave" });
Uno Platform (Flowery.Uno):
using Flowery.Controls;

// Uno uses centralized theme manager
DaisyThemeManager.ApplyTheme("Synthwave");

Theme Persistence

Avalonia:
// Save theme preference
Preferences.Set("Theme", "Synthwave");

// Load on startup
var savedTheme = Preferences.Get("Theme", "Dark");
Application.Current.Styles.Add(new DaisyTheme { Theme = savedTheme });
Uno Platform:
// Save theme preference
ApplicationData.Current.LocalSettings.Values["Theme"] = "Synthwave";

// Load on startup (BEFORE creating main window)
var savedTheme = ApplicationData.Current.LocalSettings.Values["Theme"] as string ?? "Dark";
DaisyThemeManager.ApplyTheme(savedTheme);

Styling Approach Changes

Lightweight Styling

Avalonia (Flowery.NET):
<daisy:DaisyButton>
    <daisy:DaisyButton.Styles>
        <Style Selector="daisy|DaisyButton">
            <Setter Property="Background" Value="Purple" />
        </Style>
    </daisy:DaisyButton.Styles>
</daisy:DaisyButton>
Uno Platform (Flowery.Uno):
<daisy:DaisyButton>
    <daisy:DaisyButton.Resources>
        <SolidColorBrush x:Key="DaisyButtonBackground" Color="Purple" />
    </daisy:DaisyButton.Resources>
</daisy:DaisyButton>

Application-Wide Styling

Avalonia:
<Application.Styles>
    <Style Selector="daisy|DaisyButton.Primary">
        <Setter Property="Background" Value="Purple" />
    </Style>
</Application.Styles>
Uno Platform:
<Application.Resources>
    <SolidColorBrush x:Key="DaisyButtonPrimaryBackground" Color="Purple" />
</Application.Resources>

Code-Behind Changes

Dispatcher Access

Avalonia:
Avalonia.Threading.Dispatcher.UIThread.Post(() =>
{
    // UI update
});
Uno Platform:
DispatcherQueue.TryEnqueue(() =>
{
    // UI update
});

Observable Collections

Avalonia:
using Avalonia.Collections;

public AvaloniaList<string> Items { get; } = new();
Uno Platform:
using System.Collections.ObjectModel;

public ObservableCollection<string> Items { get; } = new();

Version Updates (Flowery.Uno)

0.1.1 → 0.1.2 (February 2026)

Breaking Changes

  1. Android Target Update:
    • Changed from net9.0-android to net10.0-android36.0
    • Action Required: Update your .csproj files:
    <!-- Old -->
    <TargetFramework>net9.0-android</TargetFramework>
    
    <!-- New -->
    <TargetFramework>net10.0-android36.0</TargetFramework>
    
  2. Mobile Touch Target Changes:
    • Mobile platforms now enforce minimum 44px touch targets automatically
    • Action Required: Review custom sizing logic for mobile controls
  3. Global Default Size:
    • Changed from DaisySize.Small to DaisySize.Medium
    • Action Required: If you rely on Small as default, set explicitly:
    <daisy:DaisyButton Content="Button" Size="Small" />
    

New Features

  • Mobile-Specific Sizing: Automatic touch-target optimization on iOS/Android
  • Line-Height Tokens: Improved vertical alignment in buttons and inputs
  • PlatformCompatibility.IsMobile: Use this to detect mobile platforms

Migration Steps

1

Update target frameworks

Update Android projects to net10.0-android36.0.
2

Review custom sizing

Check if custom size logic conflicts with automatic mobile touch targets.
3

Test on mobile devices

Verify controls render correctly with new touch target minimums.
4

Update build scripts

If using custom build scripts, update Android SDK references.

0.1.0 → 0.1.1 (February 2026)

Changes

  1. Centralized Versioning:
    • Version now managed in Directory.Build.props
    • Action Required: Remove explicit <Version> from individual .csproj files
  2. Gallery Startup Optimization:
    • Improved initial rendering performance
    • Deferred heavy page loading
    • No action required (internal optimization)
  3. Dependency Updates:
    • Updated common package versions
    • Action Required: Run dotnet restore to update packages

Common Migration Issues

Issue: Controls Not Rendering

Cause: Missing Themes/Generic.xaml reference in WinUI projects. Solution: Ensure library uses GenerateLibraryLayout=true in .csproj:
<PropertyGroup>
    <GenerateLibraryLayout>true</GenerateLibraryLayout>
</PropertyGroup>

Issue: Theme Not Applied

Cause: Theme applied after window creation. Solution: Apply theme before creating main window:
protected override void OnLaunched(LaunchActivatedEventArgs args)
{
    // Apply theme FIRST
    var savedTheme = LoadThemeFromSettings() ?? "Dark";
    DaisyThemeManager.ApplyTheme(savedTheme);

    // Then create window
    MainWindow = new MainWindow();
    MainWindow.Activate();
}

Issue: Resource Keys Not Found

Cause: Using Avalonia resource syntax in WinUI project. Solution: Replace DynamicResource with ThemeResource:
<!-- ❌ Avalonia syntax -->
<Border Background="{DynamicResource DaisyBase200Brush}" />

<!-- ✅ WinUI syntax -->
<Border Background="{ThemeResource DaisyBase200Brush}" />

Issue: Binding Errors

Cause: Missing Mode in WinUI bindings. Solution: Specify binding mode explicitly:
<!-- ❌ Missing mode -->
<daisy:DaisyToggle IsOn="{x:Bind ViewModel.IsDarkMode}" />

<!-- ✅ Explicit TwoWay binding -->
<daisy:DaisyToggle IsOn="{x:Bind ViewModel.IsDarkMode, Mode=TwoWay}" />

Platform-Specific Considerations

Android

<!-- Update to Android 36 API level -->
<TargetFramework>net10.0-android36.0</TargetFramework>
<SupportedOSPlatformVersion>21.0</SupportedOSPlatformVersion>

iOS

<!-- iOS target -->
<TargetFramework>net10.0-ios17.0</TargetFramework>
<SupportedOSPlatformVersion>14.0</SupportedOSPlatformVersion>

WebAssembly (WASM)

<!-- Browser target -->
<TargetFramework>net10.0-browserwasm</TargetFramework>
Required workload:
dotnet workload install wasm-tools

Desktop (Skia)

<!-- Skia Desktop target (cross-platform) -->
<TargetFramework>net10.0</TargetFramework>

Testing Migration

1

Update project files

Update target frameworks, package references, and remove obsolete settings.
2

Replace XAML syntax

Replace Avalonia-specific syntax with WinUI equivalents (DynamicResourceThemeResource).
3

Update code-behind

Replace Avalonia-specific APIs (Dispatcher, collections) with WinUI equivalents.
4

Test on each platform

Build and run on Windows, Android, iOS, and WASM to verify platform-specific behavior.
5

Verify themes

Test theme switching and persistence across app restarts.
6

Check accessibility

Test with screen readers and keyboard navigation.

Migration Checklist

Flowery.NET → Flowery.Uno

  • Update project to Uno Platform
  • Replace DynamicResource with ThemeResource
  • Replace Avalonia dispatcher with WinUI DispatcherQueue
  • Update theme application to use DaisyThemeManager
  • Replace Avalonia collections with WinUI collections
  • Update styling approach to WinUI lightweight styling
  • Test on target platforms (Windows, Android, iOS, WASM)

Flowery.Uno 0.1.1 → 0.1.2

  • Update Android target to net10.0-android36.0
  • Remove explicit Size="Small" if using default size
  • Test controls on mobile devices for touch target sizing
  • Update build scripts for Android 36 SDK
  • Review custom sizing logic for mobile compatibility

Getting Help

GitHub Issues

Report bugs or request features

Discussions

Ask questions and share tips

Uno Platform Docs

Official Uno Platform documentation

WinUI Docs

Microsoft WinUI documentation

Next Steps

Quick Start

Get started with Flowery.Uno

Theming Guide

Master theme switching and customization

Component Reference

Explore all available controls

Styling Guide

Learn about control customization

Build docs developers (and LLMs) love