Skip to content

Commit 9bf4b05

Browse files
authored
Merge pull request #1166 from lepoco/development
Release candidate for 4.0
2 parents 9f73807 + 45969c0 commit 9bf4b05

File tree

228 files changed

+1497
-893
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

228 files changed

+1497
-893
lines changed

.github/workflows/wpf-ui-cd-nuget.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ jobs:
2828
- name: Build
2929
run: dotnet build src\Wpf.Ui\Wpf.Ui.csproj --configuration Release --no-restore -p:SourceLinkEnabled=true
3030

31+
- name: Build
32+
run: dotnet build src\Wpf.Ui.Abstractions\Wpf.Ui.Abstractions.csproj --configuration Release --no-restore -p:SourceLinkEnabled=true
33+
3134
- name: Build
3235
run: dotnet build src\Wpf.Ui.Tray\Wpf.Ui.Tray.csproj --configuration Release --no-restore -p:SourceLinkEnabled=true
3336

Directory.Build.props

Lines changed: 34 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,28 @@
11
<Project>
2+
23
<PropertyGroup>
3-
<Version>3.0.5</Version>
4-
<LangVersion>12.0</LangVersion>
5-
<Deterministic>true</Deterministic>
4+
<RepositoryDirectory>$(MSBuildThisFileDirectory)</RepositoryDirectory>
5+
<BuildToolsDirectory>$(RepositoryDirectory)build\</BuildToolsDirectory>
66
</PropertyGroup>
77

88
<PropertyGroup>
9-
<PackagesCommonFrameworks>net8.0-windows;net7.0-windows;net6.0-windows;net481;net472;net462</PackagesCommonFrameworks>
9+
<Version>4.0.0-rc.1</Version>
1010
</PropertyGroup>
1111

1212
<PropertyGroup>
13-
<Nullable>enable</Nullable>
14-
<ImplicitUsings>enable</ImplicitUsings>
15-
<PackageVersion>$(Version)</PackageVersion>
16-
<Authors>lepo.co</Authors>
1713
<Company>lepo.co</Company>
18-
<Copyright>Copyright (C) 2021-2024 Leszek Pomianowski and WPF UI Contributors</Copyright>
19-
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
14+
<Authors>lepo.co</Authors>
15+
<Product>WPF-UI</Product>
16+
<CommonTags>lepoco;toolkit;wpf;fluent;navigation;controls;design;icons;system;accent;theme;winui</CommonTags>
2017
<PackageLicenseExpression>MIT</PackageLicenseExpression>
21-
<PackageLicense>https://raw.githubusercontent.com/lepoco/wpfui/main/LICENSE</PackageLicense>
18+
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
19+
<Copyright>Copyright (C) 2021-2024 Leszek Pomianowski and WPF UI Contributors</Copyright>
2220
<PackageProjectUrl>https://github.com/lepoco/wpfui</PackageProjectUrl>
2321
<PackageReleaseNotes>https://github.com/lepoco/wpfui/releases</PackageReleaseNotes>
24-
<RepositoryUrl>https://github.com/lepoco/wpfui</RepositoryUrl>
22+
<PackageIcon>Icon.png</PackageIcon>
23+
<PackageIconUrl>https://github.com/lepoco/wpfui/main/build/nuget.png</PackageIconUrl>
2524
<RepositoryBranch>main</RepositoryBranch>
2625
<RepositoryType>git</RepositoryType>
27-
<Description>WPF UI provides the Fluent experience in your known and loved WPF framework. Intuitive design, themes, navigation and new immersive controls. All natively and effortlessly.</Description>
28-
<PackageTags>wpf ui wpfui fluent design winui windows controls custom metro modern xaml toolkit color dark theme lepo net6 net5 net</PackageTags>
29-
<PackageReadmeFile>README.md</PackageReadmeFile>
30-
</PropertyGroup>
31-
32-
<PropertyGroup>
33-
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
3426
</PropertyGroup>
3527

3628
<PropertyGroup>
@@ -41,18 +33,32 @@
4133
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
4234
</PropertyGroup>
4335

44-
<ItemGroup>
45-
<None Include="..\..\README.md" Pack="true" PackagePath="\"/>
46-
</ItemGroup>
36+
<PropertyGroup>
37+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
38+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
39+
</PropertyGroup>
4740

48-
<ItemGroup>
49-
<SourceRoot Include="$(MSBuildThisFileDirectory)/"/>
50-
</ItemGroup>
41+
<PropertyGroup>
42+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
43+
<LangVersion>12.0</LangVersion>
44+
<Nullable>enable</Nullable>
45+
46+
<!--
47+
Suppress ref safety warnings in unsafe contexts (see https://github.com/dotnet/csharplang/issues/6476).
48+
This is used eg. to replace Unsafe.SizeOf<T>() calls with just sizeof(T). The warning is not necessary
49+
since in order to use these APIs the caller already has to be in an unsafe context.
50+
-->
51+
<NoWarn>$(NoWarn);CS8500</NoWarn>
52+
</PropertyGroup>
53+
54+
<PropertyGroup>
55+
<IsTestProject>$(MSBuildProjectName.Contains('Test'))</IsTestProject>
56+
<IsCoreProject Condition="$(IsTestProject)">False</IsCoreProject>
57+
<IsCoreProject Condition="'$(IsCoreProject)' == ''">True</IsCoreProject>
58+
</PropertyGroup>
5159

5260
<ItemGroup>
53-
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
54-
<_Parameter1>$(MSBuildProjectName).UnitTests</_Parameter1>
55-
</AssemblyAttribute>
61+
<SourceRoot Include="$(MSBuildThisFileDirectory)/"/>
5662
</ItemGroup>
5763

5864
<Choose>

Directory.Build.targets

Lines changed: 86 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,89 @@
11
<Project>
2+
3+
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
4+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
5+
</PropertyGroup>
6+
7+
<PropertyGroup>
8+
<CommonTags Condition="$(IsCoreProject)">$(CommonTags);.NET</CommonTags>
9+
<PackageTags Condition="'$(PackageTags)' != ''">$(CommonTags);$(PackageTags)</PackageTags>
10+
<PackageTags Condition="'$(PackageTags)' == ''">$(CommonTags)</PackageTags>
11+
</PropertyGroup>
12+
13+
<PropertyGroup Condition="'$(GeneratePackageOnBuild)' == 'true'">
14+
<GenerateLibraryLayout>true</GenerateLibraryLayout>
15+
<PackageReadmeFile>README.md</PackageReadmeFile>
16+
<DeterministicSourcePaths Condition="'$(EnableSourceLink)' == ''">false</DeterministicSourcePaths>
17+
<IncludeSymbols>true</IncludeSymbols>
18+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
19+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
20+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
21+
</PropertyGroup>
22+
23+
<ItemGroup Condition="'$(GeneratePackageOnBuild)' == 'true'">
24+
<None Include="$(BuildToolsDirectory)nuget.png" Pack="true" PackagePath="\Icon.png" Visible="False" />
25+
<None Include="$(RepositoryDirectory)ThirdPartyNotices.txt" Pack="true" PackagePath="\" Visible="False" />
26+
<None Include="$(RepositoryDirectory)LICENSE.md" Pack="true" PackagePath="\LICENSE.md" Visible="False" />
27+
<None Include="$(RepositoryDirectory)README.md" Pack="true" PackagePath="\README.md" Visible="False" />
28+
</ItemGroup>
29+
30+
<Target Name="AddCommitHashToAssemblyAttributes" BeforeTargets="GetAssemblyAttributes">
31+
<ItemGroup>
32+
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(SourceRevisionId)' != ''">
33+
<_Parameter1>CommitHash</_Parameter1>
34+
<_Parameter2>$(SourceRevisionId)</_Parameter2>
35+
</AssemblyAttribute>
36+
</ItemGroup>
37+
</Target>
38+
39+
<!-- Configure trimming for projects on .NET 6 and above -->
40+
<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0' OR '$(TargetFramework)' == 'net8.0'">
41+
<IsTrimmable>true</IsTrimmable>
42+
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
43+
<EnableAotAnalyzer>true</EnableAotAnalyzer>
44+
<EnableSingleFileAnalyzer>true</EnableSingleFileAnalyzer>
45+
</PropertyGroup>
46+
47+
<!--
48+
The following target has been ported from TerraFX.Interop.Windows.
49+
See: https://github.com/terrafx/terrafx.interop.windows.
50+
Using [module: SkipLocalsInit] suppresses the .init flag for local variables for the entire module.
51+
This doesn't affect the correctness of methods in this assembly, as none of them are relying on the
52+
JIT ensuring that all local memory is zeroed out to work. Doing this can provide some minor
53+
performance benefits, depending on the workload.
54+
-->
55+
<PropertyGroup>
56+
<GeneratedSkipLocalsInitFile Condition="'$(GeneratedSkipLocalsInitFile)' == ''">$(IntermediateOutputPath)$(MSBuildProjectName).SkipLocalsInit.g.cs</GeneratedSkipLocalsInitFile>
57+
<GeneratedSkipLocalsInitFileLines>
58+
<![CDATA[//------------------------------------------------------------------------------
59+
// <auto-generated>
60+
// This code was generated by a tool.
61+
//
62+
// Changes to this file may cause incorrect behavior and will be lost if
63+
// the code is regenerated.
64+
// </auto-generated>
65+
//------------------------------------------------------------------------------
66+
67+
[module: global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]]]>
68+
</GeneratedSkipLocalsInitFileLines>
69+
</PropertyGroup>
70+
71+
<Target Name="GenerateSkipLocalsInit"
72+
BeforeTargets="BeforeCompile;CoreCompile"
73+
DependsOnTargets="PrepareForBuild"
74+
Condition="'$(Language)' == 'C#'"
75+
Inputs="$(MSBuildAllProjects)"
76+
Outputs="$(GeneratedSkipLocalsInitFile)">
77+
78+
<!-- Write the file with the attribute -->
79+
<WriteLinesToFile Lines="$(GeneratedSkipLocalsInitFileLines)" Overwrite="true" WriteOnlyWhenDifferent="true" File="$(GeneratedSkipLocalsInitFile)" />
80+
81+
<!-- Include the generated file in the list of files to compile -->
82+
<ItemGroup>
83+
<Compile Include="$(GeneratedSkipLocalsInitFile)" />
84+
</ItemGroup>
85+
</Target>
86+
287
<Target Name="WpfSourceLinkWorkaround" BeforeTargets="InitializeSourceRootMappedPaths" Condition="'$(UseWPF)' == 'true'">
388
<!-- WPF causes an error with SourceLink because its build targets create a temporary project without a PackageReference to SourceLink, see https://github.com/dotnet/sourcelink/issues/91,
489
causing the @SourceRoot property to be unexpectedly empty for the MapSourceRoot task
@@ -13,4 +98,4 @@
1398
<SourceRoot Include="\" />
1499
</ItemGroup>
15100
</Target>
16-
</Project>
101+
</Project>

Directory.Packages.props

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,27 @@
22
<ItemGroup>
33
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.2.2" />
44
<PackageVersion Include="coverlet.collector" Version="6.0.0" />
5-
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
5+
<PackageVersion Include="Lepo.i18n" Version="2.0.0" />
6+
<PackageVersion Include="Lepo.i18n.DependencyInjection" Version="2.0.0" />
7+
<PackageVersion Include="Lepo.i18n.Wpf" Version="2.0.0" />
8+
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.9.2" />
9+
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
610
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
711
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
8-
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
12+
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
913
<PackageVersion Include="Microsoft.VisualStudio.CoreUtility" Version="17.2.3194" />
1014
<PackageVersion Include="Microsoft.VisualStudio.SDK" Version="17.3.32804.24" />
1115
<PackageVersion Include="Microsoft.VSSDK.BuildTools" Version="17.7.2196" />
12-
<PackageVersion Include="Microsoft.Web.WebView2" Version="1.0.2151.40" />
16+
<PackageVersion Include="Microsoft.Web.WebView2" Version="1.0.2535.41" />
1317
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.2428" />
1418
<PackageVersion Include="NativeMethods" Version="0.0.3" />
1519
<PackageVersion Include="NSubstitute" Version="5.1.0" />
16-
<PackageVersion Include="PolySharp" Version="1.13.2" />
17-
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.507" />
20+
<PackageVersion Include="PolySharp" Version="1.14.1" />
21+
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
1822
<PackageVersion Include="System.Drawing.Common" Version="8.0.0" />
1923
<PackageVersion Include="System.ValueTuple" Version="4.5.0" />
2024
<PackageVersion Include="WpfAnalyzers" Version="4.1.1" />
2125
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.4" />
2226
<PackageVersion Include="xunit" Version="2.6.2" />
2327
</ItemGroup>
24-
</Project>
28+
</Project>

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021-2024 Leszek Pomianowski and WPF UI Contributors. https://dev.lepo.co/
3+
Copyright (c) 2021-2024 Leszek Pomianowski and WPF UI Contributors. https://lepo.co/
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

src/Wpf.Ui/License - Fluent System Icons.txt renamed to LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 Microsoft Corporation
3+
Copyright (c) 2021-2024 Leszek Pomianowski and WPF UI Contributors. https://lepo.co/
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)