本节主要实现加载系统本地字体功能,效果如下:

1、窗体xaml
<Window x:Class="SysFontDemo.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:SysFontDemo"
mc:Ignorable="d"
Title="MainWindow" Height="400" Width="350" WindowStartupLocation="CenterScreen">
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="1*"></RowDefinition>
<RowDefinition Height="7*"></RowDefinition>
<RowDefinition Height="

这篇博客详细介绍了如何在WPF应用中加载并显示系统本地的字体列表,包括窗体的XAML设计、字体结构体定义及交互逻辑的实现。
最低0.47元/天 解锁文章
1313

被折叠的 条评论
为什么被折叠?



