Skip to content

Commit

Permalink
Merge pull request #1014 from lepoco/development
Browse files Browse the repository at this point in the history
Sync development with main, update
  • Loading branch information
pomianowski authored Mar 24, 2024
2 parents f59daa0 + 4df88fc commit bf3c4a6
Show file tree
Hide file tree
Showing 94 changed files with 1,383 additions and 828 deletions.
89 changes: 36 additions & 53 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,8 @@ indent_size = 4
indent_style = space

# New line preferences
end_of_line = crlf
end_of_line = unset
insert_final_newline = false
dotnet_style_operator_placement_when_wrapping = beginning_of_line
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
dotnet_style_prefer_auto_properties = true:silent
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
dotnet_style_prefer_conditional_expression_over_return = true:silent
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_compound_assignment = true:suggestion
dotnet_style_prefer_simplified_interpolation = true:suggestion
dotnet_style_namespace_match_folder = true:suggestion

#### Build files ####

Expand Down Expand Up @@ -73,7 +57,7 @@ dotnet_style_qualification_for_property = false:warning

# Language keywords vs BCL types preferences
dotnet_style_predefined_type_for_locals_parameters_members = true:warning
dotnet_style_predefined_type_for_member_access = false:warning
dotnet_style_predefined_type_for_member_access = true:warning

# Parentheses preferences
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
Expand Down Expand Up @@ -111,8 +95,8 @@ dotnet_style_readonly_field = true:warning

# var preferences
csharp_style_var_elsewhere = false:warning
csharp_style_var_for_built_in_types = true:warning
csharp_style_var_when_type_is_apparent = true:warning
csharp_style_var_for_built_in_types = false:warning
csharp_style_var_when_type_is_apparent = false:warning

# Expression-bodied members
csharp_style_expression_bodied_accessors = false:silent
Expand Down Expand Up @@ -241,9 +225,9 @@ dotnet_naming_style.prefix_interface_interface_with_i.required_prefix
# Naming Rules

# Async
dotnet_naming_rule.async_methods_end_in_async.severity = silent
dotnet_naming_rule.async_methods_end_in_async.severity = silent
dotnet_naming_rule.async_methods_end_in_async.symbols = any_async_methods
dotnet_naming_rule.async_methods_end_in_async.style = end_in_async
dotnet_naming_rule.async_methods_end_in_async.style = end_in_async

dotnet_naming_symbols.any_async_methods.applicable_kinds = method
dotnet_naming_symbols.any_async_methods.applicable_accessibilities = *
Expand All @@ -253,45 +237,45 @@ dotnet_naming_style.end_in_async.required_suffix
dotnet_naming_style.end_in_async.capitalization = pascal_case

# Constant fields must be PascalCase
dotnet_naming_rule.constant_fields_must_be_pascal_case.severity = silent
dotnet_naming_rule.constant_fields_must_be_pascal_case.severity = silent
dotnet_naming_rule.constant_fields_must_be_pascal_case.symbols = constant_fields
dotnet_naming_rule.constant_fields_must_be_pascal_case.style = pascal_case
dotnet_naming_rule.constant_fields_must_be_pascal_case.style = pascal_case
# Public, internal and protected readonly fields must be PascalCase
dotnet_naming_rule.non_private_readonly_fields_must_be_pascal_case.severity = silent
dotnet_naming_rule.non_private_readonly_fields_must_be_pascal_case.severity = silent
dotnet_naming_rule.non_private_readonly_fields_must_be_pascal_case.symbols = non_private_readonly_fields
dotnet_naming_rule.non_private_readonly_fields_must_be_pascal_case.style = pascal_case
dotnet_naming_rule.non_private_readonly_fields_must_be_pascal_case.style = pascal_case
# Static readonly fields must be PascalCase
dotnet_naming_rule.static_readonly_fields_must_be_pascal_case.severity = silent
dotnet_naming_rule.static_readonly_fields_must_be_pascal_case.severity = silent
dotnet_naming_rule.static_readonly_fields_must_be_pascal_case.symbols = static_readonly_fields
dotnet_naming_rule.static_readonly_fields_must_be_pascal_case.style = pascal_case
dotnet_naming_rule.static_readonly_fields_must_be_pascal_case.style = pascal_case
# Private readonly fields must be camelCase
dotnet_naming_rule.private_readonly_fields_must_be_camel_case.severity = silent
dotnet_naming_rule.private_readonly_fields_must_be_camel_case.severity = silent
dotnet_naming_rule.private_readonly_fields_must_be_camel_case.symbols = private_readonly_fields
dotnet_naming_rule.private_readonly_fields_must_be_camel_case.style = camel_case
dotnet_naming_rule.private_readonly_fields_must_be_camel_case.style = camel_case
# Public and internal fields must be PascalCase
dotnet_naming_rule.public_internal_protected_fields_must_be_pascal_case.severity = silent
dotnet_naming_rule.public_internal_protected_fields_must_be_pascal_case.severity = silent
dotnet_naming_rule.public_internal_protected_fields_must_be_pascal_case.symbols = public_internal_protected_fields
dotnet_naming_rule.public_internal_protected_fields_must_be_pascal_case.style = pascal_case
dotnet_naming_rule.public_internal_protected_fields_must_be_pascal_case.style = pascal_case
# Private and protected fields must be camelCase
dotnet_naming_rule.private_fields_must_be_camel_case.severity = silent
dotnet_naming_rule.private_fields_must_be_camel_case.severity = silent
dotnet_naming_rule.private_fields_must_be_camel_case.symbols = private_protected_fields
dotnet_naming_rule.private_fields_must_be_camel_case.style = prefix_private_field_with_underscore
dotnet_naming_rule.private_fields_must_be_camel_case.style = prefix_private_field_with_underscore
# Public members must be capitalized
dotnet_naming_rule.public_members_must_be_capitalized.severity = silent
dotnet_naming_rule.public_members_must_be_capitalized.severity = silent
dotnet_naming_rule.public_members_must_be_capitalized.symbols = public_symbols
dotnet_naming_rule.public_members_must_be_capitalized.style = first_upper
dotnet_naming_rule.public_members_must_be_capitalized.style = first_upper
# Parameters must be camelCase
dotnet_naming_rule.parameters_must_be_camel_case.severity = silent
dotnet_naming_rule.parameters_must_be_camel_case.severity = silent
dotnet_naming_rule.parameters_must_be_camel_case.symbols = parameters
dotnet_naming_rule.parameters_must_be_camel_case.style = camel_case
dotnet_naming_rule.parameters_must_be_camel_case.style = camel_case
# Class, struct, enum and delegates must be PascalCase
dotnet_naming_rule.non_interface_types_must_be_pascal_case.severity = silent
dotnet_naming_rule.non_interface_types_must_be_pascal_case.severity = silent
dotnet_naming_rule.non_interface_types_must_be_pascal_case.symbols = non_interface_types
dotnet_naming_rule.non_interface_types_must_be_pascal_case.style = pascal_case
dotnet_naming_rule.non_interface_types_must_be_pascal_case.style = pascal_case
# Interfaces must be PascalCase and start with an 'I'
dotnet_naming_rule.interface_types_must_be_prefixed_with_i.severity = silent
dotnet_naming_rule.interface_types_must_be_prefixed_with_i.severity = silent
dotnet_naming_rule.interface_types_must_be_prefixed_with_i.symbols = interface_types
dotnet_naming_rule.interface_types_must_be_prefixed_with_i.style = prefix_interface_interface_with_i
dotnet_naming_rule.interface_types_must_be_prefixed_with_i.style = prefix_interface_interface_with_i
# prefix_private_field_with_underscore - Private fields must be prefixed with _
dotnet_naming_style.prefix_private_field_with_underscore.capitalization = camel_case
dotnet_naming_style.prefix_private_field_with_underscore.required_prefix = _
Expand Down Expand Up @@ -361,12 +345,6 @@ dotnet_diagnostic.CA2240.severity = warning
dotnet_diagnostic.CA2241.severity = warning
dotnet_diagnostic.CA2242.severity = warning

# Stylecop Analyzers
dotnet_diagnostic.SA1111.severity = none
dotnet_diagnostic.SA1121.severity = none
dotnet_diagnostic.SA1208.severity = none
dotnet_diagnostic.SA1518.severity = none

# Require file header OR A source file contains a header that does not match the required text
dotnet_diagnostic.IDE0073.severity = error

Expand Down Expand Up @@ -409,8 +387,13 @@ dotnet_diagnostic.SA1629.severity = none
dotnet_diagnostic.SA1633.severity = none
dotnet_diagnostic.SA1634.severity = none
dotnet_diagnostic.SA1652.severity = none
csharp_prefer_simple_using_statement = true:suggestion
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = true:silent
csharp_style_expression_bodied_local_functions = false:silent
csharp_style_prefer_null_check_over_type_check = true:suggestion

dotnet_diagnostic.IDE0009.severity = none

# Additional Stylecop Analyzers
dotnet_diagnostic.SA1111.severity = none
dotnet_diagnostic.SA1121.severity = none
dotnet_diagnostic.SA1204.severity = none
dotnet_diagnostic.SA1208.severity = none
dotnet_diagnostic.SA1518.severity = none
dotnet_diagnostic.SA1615.severity = none
2 changes: 1 addition & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ controls:

navigation:
- changed-files:
- any-glob-to-any-file: 'src/Wpf.Ui/Controls/NavigationView/'
- any-glob-to-any-file: 'src/Wpf.Ui/Controls/NavigationView/**'

gallery:
- changed-files:
Expand Down
17 changes: 9 additions & 8 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<Version>3.0.2</Version>
<Version>3.0.3</Version>
<LangVersion>12.0</LangVersion>
<Deterministic>true</Deterministic>
</PropertyGroup>

<PropertyGroup>
<NuGetAudit>true</NuGetAudit>
<NuGetAuditLevel>moderate</NuGetAuditLevel>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>false</CentralPackageTransitivePinningEnabled>
</PropertyGroup>

<PropertyGroup>
<Authors>lepo.co</Authors>
<Company>lepo.co</Company>
Expand All @@ -37,6 +30,14 @@
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<PropertyGroup>
<NuGetAudit>true</NuGetAudit>
<NuGetAuditLevel>moderate</NuGetAuditLevel>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>false</CentralPackageTransitivePinningEnabled>
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
</PropertyGroup>

<ItemGroup>
<None Include="..\..\README.md" Pack="true" PackagePath="\"/>
</ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/Wpf.Ui.Demo.Console/Wpf.Ui.Demo.Console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<ApplicationIcon>wpfui.ico</ApplicationIcon>
<NoWarn>$(NoWarn);SA1601</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/Wpf.Ui.Demo.Mvvm/Wpf.Ui.Demo.Mvvm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<ApplicationManifest>app.manifest</ApplicationManifest>
<ApplicationIcon>applicationIcon.ico</ApplicationIcon>
<Platforms>AnyCPU;x64</Platforms>
<NoWarn>$(NoWarn);SA1601</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/Wpf.Ui.Demo.Simple/Wpf.Ui.Demo.Simple.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<ApplicationManifest>app.manifest</ApplicationManifest>
<ApplicationIcon>applicationIcon.ico</ApplicationIcon>
<Platforms>AnyCPU;x64</Platforms>
<NoWarn>$(NoWarn);SA1601</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
7 changes: 1 addition & 6 deletions src/Wpf.Ui.Extension.Template.Blank/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
// All Rights Reserved.

using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using System.IO;
using System.Reflection;
Expand Down
5 changes: 0 additions & 5 deletions src/Wpf.Ui.Extension.Template.Blank/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
// All Rights Reserved.

using System.Windows;

[assembly: ThemeInfo(
Expand Down
2 changes: 1 addition & 1 deletion src/Wpf.Ui.Extension.Template.Blank/Wpf.Ui.Blank.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="WPF-UI" Version="3.0.0" />
<PackageReference Include="WPF-UI" Version="3.0.3" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0 " />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2 "/>
</ItemGroup>
Expand Down
7 changes: 1 addition & 6 deletions src/Wpf.Ui.Extension.Template.Compact/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
// All Rights Reserved.

using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using System.IO;
Expand Down
5 changes: 0 additions & 5 deletions src/Wpf.Ui.Extension.Template.Compact/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
// All Rights Reserved.

using System.Windows;

[assembly: ThemeInfo(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
// All Rights Reserved.

using System.Globalization;
using System.Globalization;
using System.Windows.Data;
using Wpf.Ui.Appearance;

Expand Down
7 changes: 1 addition & 6 deletions src/Wpf.Ui.Extension.Template.Compact/Models/AppConfig.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
// All Rights Reserved.

namespace $safeprojectname$.Models
namespace $safeprojectname$.Models
{
public class AppConfig
{
Expand Down
7 changes: 1 addition & 6 deletions src/Wpf.Ui.Extension.Template.Compact/Models/DataColor.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
// All Rights Reserved.

using System.Windows.Media;
using System.Windows.Media;

namespace $safeprojectname$.Models
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
// All Rights Reserved.

namespace $safeprojectname$.Resources
{
public partial class Translations
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
// All Rights Reserved.

using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Wpf.Ui;
using $safeprojectname$.Views.Pages;
Expand Down
5 changes: 0 additions & 5 deletions src/Wpf.Ui.Extension.Template.Compact/Services/PageService.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
// All Rights Reserved.

using Wpf.Ui;

namespace $safeprojectname$.Services
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
// All Rights Reserved.

namespace $safeprojectname$.ViewModels.Pages
namespace $safeprojectname$.ViewModels.Pages
{
public partial class DashboardViewModel : ObservableObject
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
// All Rights Reserved.

using System.Windows.Media;
using System.Windows.Media;
using $safeprojectname$.Models;
using Wpf.Ui.Controls;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
// All Rights Reserved.

using Wpf.Ui.Appearance;
using Wpf.Ui.Appearance;
using Wpf.Ui.Controls;

namespace $safeprojectname$.ViewModels.Pages
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
// All Rights Reserved.

using System.Collections.ObjectModel;
using System.Collections.ObjectModel;
using Wpf.Ui.Controls;

namespace $safeprojectname$.ViewModels.Windows
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
// All Rights Reserved.

using $safeprojectname$.ViewModels.Pages;
using $safeprojectname$.ViewModels.Pages;
using Wpf.Ui.Controls;

namespace $safeprojectname$.Views.Pages
Expand Down
Loading

0 comments on commit bf3c4a6

Please sign in to comment.