在 WPF 项目中使用 WPFDevelopers NuGet 包
控件名:Install-Package WPFDevelopers -Version 1.1.0.3-preview
作 者:WPFDevelopersOrg - 驚鏵
原文链接[1]:https://github.com/WPFDevelopersOrg/WPFDevelopers
码云链接[2]:https://gitee.com/WPFDevelopersOrg/WPFDevelopers
框架支持 .NET4 至 .NET8
;Visual Studio 2022
;
欢迎各位开发者下载并体验。如果在使用过程中遇到任何问题,欢迎随时向我们反馈[3]。
1. 管理 Nuget 程序包
2.搜索 WPFDevelopers ,并勾选包括预发行版,并安装最新包
3.App.xaml 引入 WPFDevelopers
先引入命名空间
xmlns:wd="https://github.com/WPFDevelopersOrg/WPFDevelopers"
Application.Resources
新增WPFDevelopers
资源,可从Nuget
的描述信息中复制
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<wd:Resources Theme="Light" Color="Fuchsia"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
使用 XAML 示例
以 DateRangePicker
和Button
为例
<Window
x:Class="WDSample.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:wd="https://github.com/WPFDevelopersOrg/WPFDevelopers"
Title="WPFDevelopersSample"
Width="800"
Height="450"
mc:Ignorable="d">
<Grid wd:PanelHelper.Spacing="2">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<StackPanel
HorizontalAlignment="Center"
VerticalAlignment="Center"
wd:PanelHelper.Spacing="2"
Orientation="Horizontal">
<Button Content="WPFDevelopers" />
<Button
wd:ElementHelper.CornerRadius="3"
Content="WPFDevelopers"
Style="{StaticResource WD.PrimaryButton}" />
</StackPanel>
<wd:DateRangePicker
Grid.Row="1"
Width="240"
HorizontalAlignment="Center"
VerticalAlignment="Center"
wd:ElementHelper.CornerRadius="3"
EndWatermark="结束时间"
StartWatermark="开始时间" />
</Grid>
</Window>
GitHub 源码地址[4]
Gitee 源码地址[5]
原文链接: https://github.com/WPFDevelopersOrg/WPFDevelopers
[2]码云链接: https://gitee.com/WPFDevelopersOrg/WPFDevelopers
[3]反馈: https://github.com/WPFDevelopersOrg/WPFDevelopers/issues/new
[4]GitHub 源码地址: https://github.com/WPFDevelopersOrg/WPFDevelopers/blob/dev/src/WPFDevelopers.Samples.Shared/App.xaml
[5]Gitee 源码地址: https://gitee.com/WPFDevelopersOrg/WPFDevelopers/blob/dev/src/WPFDevelopers.Samples.Shared/App.xaml"Gitee