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
<PackageReference Include="ALampy.XamlFontPicker.WPF" Version="2.0.1" />
<PackageVersion Include="ALampy.XamlFontPicker.WPF" Version="2.0.1" />
<PackageReference Include="ALampy.XamlFontPicker.WPF" />
paket add ALampy.XamlFontPicker.WPF --version 2.0.1
#r "nuget: ALampy.XamlFontPicker.WPF, 2.0.1"
#:package ALampy.XamlFontPicker.WPF@2.0.1
#addin nuget:?package=ALampy.XamlFontPicker.WPF&version=2.0.1
#tool nuget:?package=ALampy.XamlFontPicker.WPF&version=2.0.1
ALampy.XamlFontPicker
A Xaml control for picking fonts, with a built-in font dialog, supporting WPF and Avalonia.
WPF:
Namespace:ALampy.XamlFontPicker.WPF(CLR) orxmlns:fp="https://github.com/ArcticLampyrid/XamlFontPicker"(XAML)Avalonia:
Namespace:ALampy.XamlFontPicker.Avalonia(CLR) orxmlns: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
<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 | Versions 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. |
-
.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.