ALampy.XamlFontPicker.WPF 2.0.1

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

ALampy.XamlFontPicker

A Xaml control for picking fonts, with a built-in font dialog, supporting WPF and Avalonia.

  • WPF: NuGet
    Namespace: ALampy.XamlFontPicker.WPF(CLR) or xmlns:fp="https://github.com/ArcticLampyrid/XamlFontPicker" (XAML)

  • Avalonia: NuGet
    Namespace: ALampy.XamlFontPicker.Avalonia (CLR) or xmlns:fp="using:ALampy.XamlFontPicker.Avalonia" (XAML)

This project is co-maintained by 萤火 (ALampy) and AI companion 小雪 (Koyuki). ❄️

Install

WPF

  • Package Manager Install-Package ALampy.XamlFontPicker.WPF
  • .NET CLI dotnet add package ALampy.XamlFontPicker.WPF

Avalonia

  • Package Manager Install-Package ALampy.XamlFontPicker.Avalonia
  • .NET CLI dotnet add package ALampy.XamlFontPicker.Avalonia

Usage (WPF)

  • See ALampy.XamlFontPicker.WPF.Sample

Usage (Avalonia 11)

<Window xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:fp="using:ALampy.XamlFontPicker.Avalonia">
  <StackPanel>
    <fp:FontPicker x:Name="FontPicker1" Width="400" />
  </StackPanel>
</Window>
// Subscribe to selection changes
_fontPicker.GetObservable(FontPicker.SelectedFontInfoProperty)
    .Subscribe(fontInfo => Console.WriteLine(fontInfo));

// Or open dialog directly
var dialog = new FontDialog();
var result = await dialog.ShowDialog<bool>(this);
if (result)
{
    var fontInfo = dialog.SelectedFontInfo;
}

Preview

Screenshot 1

<StackPanel Orientation="Vertical">
    <Button x:Name="OpenFontDialogButton" Click="OpenFontDialogButton_Click">OpenFontDialog</Button>
    <fp:FontPicker x:Name="FontPicker1"/>
</StackPanel>
private void OpenFontDialogButton_Click(object sender, RoutedEventArgs e)
{
    FontPicker1.OpenFontDialog();
}

Development

Utilities

WpfSampleScreenshot

A utility for taking screenshots of WPF samples, which can be used in quick preview. This utility is run in Docker container with Wine, so it can be used on non-Windows platforms as well. But some features may work sightly differently from native Windows environment.

./Utils/WpfSampleScreenshot/run.sh
AvaloniaSampleScreenshot

A utility for taking screenshots of Avalonia samples in Docker on Arch Linux. It uses headless X11 (Xvfb) + a lightweight WM (herbstluftwm) and multi-stage image build, aligned with the WPF screenshot pipeline but without Wine.

./Utils/AvaloniaSampleScreenshot/run.sh
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
.NET Core netcoreapp3.0 is compatible.  netcoreapp3.1 was computed. 
.NET Framework net40 is compatible.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.0

    • No dependencies.
  • .NETFramework 4.0

    • No dependencies.

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
2.0.1 31 3/6/2026
2.0.0 41 3/5/2026