From fe18103ef12a3884de44c51d5bc39de94782429a Mon Sep 17 00:00:00 2001 From: michael-hawker <24302614+michael-hawker@users.noreply.github.com> Date: Wed, 15 Mar 2023 14:44:17 -0700 Subject: [PATCH] Initial setup of configuration files, build script, and documentation for the repo --- .config/dotnet-tools.json | 24 ++ .devcontainer/Dockerfile | 24 ++ .devcontainer/default.code-workspace | 19 ++ .devcontainer/devcontainer.json | 70 +++++ .editorconfig | 437 +++++++++++++++++++++++++++ .github/workflows/build.yml | 199 ++++++++++++ .gitignore | 364 ++++++++++++++++++++++ .vscode/extensions.json | 5 + .vscode/launch.json | 37 +++ .vscode/settings.json | 12 + .vscode/tasks.json | 13 + .vsconfig | 94 ++++++ ApplyXamlStyling.ps1 | 128 ++++++++ CODE_OF_CONDUCT.md | 76 +++++ Contributing.md | 46 +++ Directory.Build.props | 24 ++ Directory.Build.targets | 28 ++ GenerateAllSolution.bat | 5 + License.md | 13 + ReadMe.md | 63 ++++ Windows.Toolkit.Common.props | 36 +++ global.json | 10 + settings.xamlstyler | 42 +++ 23 files changed, 1769 insertions(+) create mode 100644 .config/dotnet-tools.json create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/default.code-workspace create mode 100644 .devcontainer/devcontainer.json create mode 100644 .editorconfig create mode 100644 .github/workflows/build.yml create mode 100644 .gitignore create mode 100644 .vscode/extensions.json create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json create mode 100644 .vscode/tasks.json create mode 100644 .vsconfig create mode 100644 ApplyXamlStyling.ps1 create mode 100644 CODE_OF_CONDUCT.md create mode 100644 Contributing.md create mode 100644 Directory.Build.props create mode 100644 Directory.Build.targets create mode 100644 GenerateAllSolution.bat create mode 100644 License.md create mode 100644 ReadMe.md create mode 100644 Windows.Toolkit.Common.props create mode 100644 global.json create mode 100644 settings.xamlstyler diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json new file mode 100644 index 00000000..98537666 --- /dev/null +++ b/.config/dotnet-tools.json @@ -0,0 +1,24 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "uno.check": { + "version": "1.10.0", + "commands": [ + "uno-check" + ] + }, + "xamlstyler.console": { + "version": "3.2206.4", + "commands": [ + "xstyler" + ] + }, + "microsoft.visualstudio.slngen.tool": { + "version": "9.5.4", + "commands": [ + "slngen" + ] + } + } +} \ No newline at end of file diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 00000000..c8987eb9 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,24 @@ +# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.208.0/containers/dotnet/.devcontainer/base.Dockerfile + +# [Choice] .NET version: 6.0, 5.0, 3.1, 6.0-bullseye, 5.0-bullseye, 3.1-bullseye, 6.0-focal, 5.0-focal, 3.1-focal +ARG VARIANT="6.0-bullseye-slim" +FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${VARIANT} + +# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 +ARG NODE_VERSION="none" +RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi + +# [Optional] Uncomment this section to install additional OS packages. +# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ +# && apt-get -y install --no-install-recommends + +RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ + && apt-get -y install --no-install-recommends ninja-build + +RUN apt-get update && apt-get install -y --no-install-recommends apt-transport-https dirmngr gnupg ca-certificates \ + && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF \ + && echo "deb https://download.mono-project.com/repo/debian stable-buster main" | tee /etc/apt/sources.list.d/mono-official-stable.list \ + && apt-get update && apt-get -y --no-install-recommends install mono-complete + +# [Optional] Uncomment this line to install global node packages. +# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g " 2>&1 \ No newline at end of file diff --git a/.devcontainer/default.code-workspace b/.devcontainer/default.code-workspace new file mode 100644 index 00000000..9a1a0c53 --- /dev/null +++ b/.devcontainer/default.code-workspace @@ -0,0 +1,19 @@ +{ + "folders": [ + { + "path": ".." + } + ], + "settings": { + "omnisharp.defaultLaunchSolution": "CommunityToolkit.AllComponents.sln", + "omnisharp.disableMSBuildDiagnosticWarning": true, + "omnisharp.enableRoslynAnalyzers": true, + "omnisharp.useGlobalMono": "never", + "csharp.suppressBuildAssetsNotification": true, + "csharp.suppressDotnetInstallWarning": true, + "csharp.suppressDotnetRestoreNotification": true, + "csharp.semanticHighlighting.enabled": true, + "omnisharp.enableImportCompletion": true, + "omnisharp.enableMsBuildLoadProjectsOnDemand": true + } +} \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..b4cccfde --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,70 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: +// https://github.com/microsoft/vscode-dev-containers/tree/v0.208.0/containers/dotnet +{ + "name": "C# (.NET)", + "build": { + "dockerfile": "Dockerfile", + "args": { + // Update 'VARIANT' to pick a .NET Core version: 3.1, 5.0, 6.0 + // Append -bullseye or -focal to pin to an OS version. + "VARIANT": "6.0", + // Options + "NODE_VERSION": "lts/*" + } + }, + // Set *default* container specific settings.json values on container create. + "settings": {}, + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "ms-dotnettools.csharp", + "unoplatform.vscode", + "ms-vsliveshare.vsliveshare", + "ms-vscode.powershell" + ], + // Use 'forwardPorts' to make a list of ports inside the container available locally. + "forwardPorts": [ + 5000, + 5001 + ], + + "appPort": [ + 5000, + 5001 + ], + // [Optional] To reuse of your local HTTPS dev cert: + // + // 1. Export it locally using this command: + // * Windows PowerShell: + // dotnet dev-certs https --trust; dotnet dev-certs https -ep "$env:USERPROFILE/.aspnet/https/aspnetapp.pfx" -p "SecurePwdGoesHere" + // * macOS/Linux terminal: + // dotnet dev-certs https --trust; dotnet dev-certs https -ep "${HOME}/.aspnet/https/aspnetapp.pfx" -p "SecurePwdGoesHere" + // + // 2. Uncomment these 'remoteEnv' lines: + // "remoteEnv": { + // "ASPNETCORE_Kestrel__Certificates__Default__Password": "SecurePwdGoesHere", + // "ASPNETCORE_Kestrel__Certificates__Default__Path": "/home/vscode/.aspnet/https/aspnetapp.pfx", + // }, + // + // 3. Do one of the following depending on your scenario: + // * When using GitHub Codespaces and/or Remote - Containers: + // 1. Start the container + // 2. Drag ~/.aspnet/https/aspnetapp.pfx into the root of the file explorer + // 3. Open a terminal in VS Code and run "mkdir -p /home/vscode/.aspnet/https && mv aspnetapp.pfx /home/vscode/.aspnet/https" + // + // * If only using Remote - Containers with a local container, uncomment this line instead: + // "mounts": [ "source=${env:HOME}${env:USERPROFILE}/.aspnet/https,target=/home/vscode/.aspnet/https,type=bind" ], + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "dotnet restore", + "postCreateCommand": "dotnet dev-certs https --trust", + // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. + "remoteUser": "vscode", + "features": { + "powershell": "latest" + }, + "portsAttributes": { + "5000": { + "label": "WebAssembly App", + "onAutoForward": "openPreview" + } + } +} \ No newline at end of file diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..21a44161 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,437 @@ +# Remove the line below if you want to inherit .editorconfig settings from higher directories +root = true + +# Generated code +[*{_AssemblyInfo.cs,.g.cs}] +generated_code = true + +# All files +[*] + +# .NET Foundation Header +file_header_template = Licensed to the .NET Foundation under one or more agreements.\nThe .NET Foundation licenses this file to you under the MIT license.\nSee the LICENSE file in the project root for more information. + +#### Core EditorConfig Options #### + +# Encoding +charset = utf-8 + +# Indentation and spacing +tab_width = 4 +indent_size = 4 +indent_style = space + +# New line preferences +end_of_line = crlf +trim_trailing_whitespace = true +insert_final_newline = true +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:suggestion +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_compound_assignment = true:suggestion +dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion +dotnet_style_namespace_match_folder = true:suggestion +dotnet_style_prefer_simplified_interpolation = true:suggestion +dotnet_style_readonly_field = true:suggestion +dotnet_style_predefined_type_for_locals_parameters_members = true:silent +dotnet_style_predefined_type_for_member_access = true:silent +dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent +dotnet_style_allow_multiple_blank_lines_experimental = true:silent +dotnet_style_allow_statement_immediately_after_block_experimental = true:silent +dotnet_code_quality_unused_parameters = all:suggestion +dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent +dotnet_style_qualification_for_field = true:silent +dotnet_style_qualification_for_property = true:silent +dotnet_style_qualification_for_method = true:silent +dotnet_style_qualification_for_event = true:silent + +#### Build files #### + +# Solution files +[*.{sln,slnx}] +tab_width = 4 +indent_size = 4 +indent_style = tab + +# Configuration files +[*.{json,xml,yml,config,runsettings}] +indent_size = 2 + +# MSBuild files +[*.{slnf,props,targets,projitems,csproj,shproj}] +indent_size = 2 + +#### Source files #### + +# Markdown files +[*.md] +indent_size = 2 +insert_final_newline = true + +# C# files +[*.cs] + +#### .NET Coding Conventions #### + +# this. and Me. preferences +dotnet_style_qualification_for_event = true:silent +dotnet_style_qualification_for_field = true:silent +dotnet_style_qualification_for_method = true:silent +dotnet_style_qualification_for_property = true:silent + +# Language keywords vs BCL types preferences +dotnet_style_predefined_type_for_locals_parameters_members = true:silent +dotnet_style_predefined_type_for_member_access = true:silent + +# Parentheses preferences +dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent +dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent + +# Modifier preferences +dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent + +# Expression-level preferences +csharp_style_deconstructed_variable_declaration = true:suggestion +csharp_style_inlined_variable_declaration = true:silent +csharp_style_throw_expression = true:suggestion +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_explicit_tuple_names = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_object_initializer = true:suggestion +dotnet_style_prefer_auto_properties = true:silent +dotnet_style_prefer_conditional_expression_over_assignment = true:silent +dotnet_style_prefer_conditional_expression_over_return = true:silent +dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion +dotnet_style_prefer_inferred_tuple_names = true:suggestion +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion + +# Field preferences +dotnet_style_readonly_field = true:suggestion + +#### C# Coding Conventions #### + +# var preferences +csharp_style_var_elsewhere = true:silent +csharp_style_var_for_built_in_types = true:silent +csharp_style_var_when_type_is_apparent = true:silent + +# Expression-bodied members +csharp_style_expression_bodied_accessors = false:silent +csharp_style_expression_bodied_constructors = false:silent +csharp_style_expression_bodied_indexers = false:silent +csharp_style_expression_bodied_lambdas = true:silent +csharp_style_expression_bodied_methods = false:silent +csharp_style_expression_bodied_operators = false:silent +csharp_style_expression_bodied_properties = false:silent + +# Pattern matching preferences +csharp_style_pattern_matching_over_as_with_null_check = true:silent +csharp_style_pattern_matching_over_is_with_cast_check = true:silent + +# Null-checking preferences +csharp_style_conditional_delegate_call = true:suggestion + +# Modifier preferences +csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async + +# Code-block preferences +csharp_prefer_braces = true:suggestion + +# Expression-level preferences +csharp_prefer_simple_default_expression = true:suggestion +csharp_style_pattern_local_over_anonymous_function = true:suggestion + +#### C# Formatting Rules #### + +# New line preferences +csharp_new_line_before_catch = true +csharp_new_line_before_else = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_anonymous_types = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_open_brace = all +csharp_new_line_between_query_expression_clauses = true + +# Indentation preferences +csharp_indent_block_contents = true +csharp_indent_braces = false +csharp_indent_case_contents = true +csharp_indent_case_contents_when_block = false +csharp_indent_labels = no_change +csharp_indent_switch_labels = true + +# Space preferences +csharp_space_after_cast = false +csharp_space_after_colon_in_inheritance_clause = true +csharp_space_after_comma = true +csharp_space_after_dot = false +csharp_space_after_keywords_in_control_flow_statements = true +csharp_space_after_semicolon_in_for_statement = true +csharp_space_around_binary_operators = before_and_after +csharp_space_around_declaration_statements = false +csharp_space_before_colon_in_inheritance_clause = true +csharp_space_before_comma = false +csharp_space_before_dot = false +csharp_space_before_open_square_brackets = false +csharp_space_before_semicolon_in_for_statement = false +csharp_space_between_empty_square_brackets = false +csharp_space_between_method_call_empty_parameter_list_parentheses = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_call_parameter_list_parentheses = false +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false +csharp_space_between_method_declaration_name_and_open_parenthesis = false +csharp_space_between_method_declaration_parameter_list_parentheses = false +csharp_space_between_parentheses = false +csharp_space_between_square_brackets = false + +# Wrapping preferences +csharp_preserve_single_line_blocks = true +csharp_preserve_single_line_statements = true + +# Naming Symbols + +# constant_fields - Define constant fields +dotnet_naming_symbols.constant_fields.applicable_kinds = field +dotnet_naming_symbols.constant_fields.required_modifiers = const +# non_private_readonly_fields - Define public, internal and protected readonly fields +dotnet_naming_symbols.non_private_readonly_fields.applicable_accessibilities = public, internal, protected +dotnet_naming_symbols.non_private_readonly_fields.applicable_kinds = field +dotnet_naming_symbols.non_private_readonly_fields.required_modifiers = readonly +# static_readonly_fields - Define static and readonly fields +dotnet_naming_symbols.static_readonly_fields.applicable_kinds = field +dotnet_naming_symbols.static_readonly_fields.required_modifiers = static, readonly +# private_readonly_fields - Define private readonly fields +dotnet_naming_symbols.private_readonly_fields.applicable_accessibilities = private +dotnet_naming_symbols.private_readonly_fields.applicable_kinds = field +dotnet_naming_symbols.private_readonly_fields.required_modifiers = readonly +# public_internal_fields - Define public and internal fields +dotnet_naming_symbols.public_internal_protected_fields.applicable_accessibilities = public, internal, protected +dotnet_naming_symbols.public_internal_protected_fields.applicable_kinds = field +# private_protected_fields - Define private and protected fields +dotnet_naming_symbols.private_protected_fields.applicable_accessibilities = private, protected +dotnet_naming_symbols.private_protected_fields.applicable_kinds = field +# public_symbols - Define any public symbol +dotnet_naming_symbols.public_symbols.applicable_accessibilities = public, internal, protected, protected_internal +dotnet_naming_symbols.public_symbols.applicable_kinds = method, property, event, delegate +# parameters - Defines any parameter +dotnet_naming_symbols.parameters.applicable_kinds = parameter +# non_interface_types - Defines class, struct, enum and delegate types +dotnet_naming_symbols.non_interface_types.applicable_kinds = class, struct, enum, delegate +# interface_types - Defines interfaces +dotnet_naming_symbols.interface_types.applicable_kinds = interface + +# Naming Styles + +# camel_case - Define the camelCase style +dotnet_naming_style.camel_case.capitalization = camel_case +# pascal_case - Define the Pascal_case style +dotnet_naming_style.pascal_case.capitalization = pascal_case +# first_upper - The first character must start with an upper-case character +dotnet_naming_style.first_upper.capitalization = first_word_upper +# prefix_interface_interface_with_i - Interfaces must be PascalCase and the first character of an interface must be an 'I' +dotnet_naming_style.prefix_interface_interface_with_i.capitalization = pascal_case +dotnet_naming_style.prefix_interface_interface_with_i.required_prefix = I + +# Naming Rules + +# Async +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_symbols.any_async_methods.applicable_kinds = method +dotnet_naming_symbols.any_async_methods.applicable_accessibilities = * +dotnet_naming_symbols.any_async_methods.required_modifiers = async + +dotnet_naming_style.end_in_async.required_suffix = Async +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.symbols = constant_fields +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.symbols = non_private_readonly_fields +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.symbols = static_readonly_fields +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.symbols = private_readonly_fields +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.symbols = public_internal_protected_fields +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.symbols = private_protected_fields +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.symbols = public_symbols +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.symbols = parameters +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.symbols = non_interface_types +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.symbols = interface_types +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 = _ + +# .NET Code Analysis + +dotnet_diagnostic.CA1001.severity = warning +dotnet_diagnostic.CA1009.severity = warning +dotnet_diagnostic.CA1016.severity = warning +dotnet_diagnostic.CA1033.severity = warning +dotnet_diagnostic.CA1049.severity = warning +dotnet_diagnostic.CA1060.severity = warning +dotnet_diagnostic.CA1061.severity = warning +dotnet_diagnostic.CA1063.severity = warning +dotnet_diagnostic.CA1065.severity = warning +dotnet_diagnostic.CA1301.severity = warning +dotnet_diagnostic.CA1400.severity = warning +dotnet_diagnostic.CA1401.severity = warning +dotnet_diagnostic.CA1403.severity = warning +dotnet_diagnostic.CA1404.severity = warning +dotnet_diagnostic.CA1405.severity = warning +dotnet_diagnostic.CA1410.severity = warning +dotnet_diagnostic.CA1415.severity = warning +dotnet_diagnostic.CA1821.severity = warning +dotnet_diagnostic.CA1900.severity = warning +dotnet_diagnostic.CA1901.severity = warning +dotnet_diagnostic.CA2002.severity = warning +dotnet_diagnostic.CA2100.severity = warning +dotnet_diagnostic.CA2101.severity = warning +dotnet_diagnostic.CA2108.severity = warning +dotnet_diagnostic.CA2111.severity = warning +dotnet_diagnostic.CA2112.severity = warning +dotnet_diagnostic.CA2114.severity = warning +dotnet_diagnostic.CA2116.severity = warning +dotnet_diagnostic.CA2117.severity = warning +dotnet_diagnostic.CA2122.severity = warning +dotnet_diagnostic.CA2123.severity = warning +dotnet_diagnostic.CA2124.severity = warning +dotnet_diagnostic.CA2126.severity = warning +dotnet_diagnostic.CA2131.severity = warning +dotnet_diagnostic.CA2132.severity = warning +dotnet_diagnostic.CA2133.severity = warning +dotnet_diagnostic.CA2134.severity = warning +dotnet_diagnostic.CA2137.severity = warning +dotnet_diagnostic.CA2138.severity = warning +dotnet_diagnostic.CA2140.severity = warning +dotnet_diagnostic.CA2141.severity = warning +dotnet_diagnostic.CA2146.severity = warning +dotnet_diagnostic.CA2147.severity = warning +dotnet_diagnostic.CA2149.severity = warning +dotnet_diagnostic.CA2200.severity = warning +dotnet_diagnostic.CA2202.severity = warning +dotnet_diagnostic.CA2207.severity = warning +dotnet_diagnostic.CA2212.severity = warning +dotnet_diagnostic.CA2213.severity = warning +dotnet_diagnostic.CA2214.severity = warning +dotnet_diagnostic.CA2216.severity = warning +dotnet_diagnostic.CA2220.severity = warning +dotnet_diagnostic.CA2229.severity = warning +dotnet_diagnostic.CA2231.severity = warning +dotnet_diagnostic.CA2232.severity = warning +dotnet_diagnostic.CA2235.severity = warning +dotnet_diagnostic.CA2236.severity = warning +dotnet_diagnostic.CA2237.severity = warning +dotnet_diagnostic.CA2238.severity = warning +dotnet_diagnostic.CA2240.severity = warning +dotnet_diagnostic.CA2241.severity = warning +dotnet_diagnostic.CA2242.severity = warning + +# StyleCop Code Analysis + +# Closing parenthesis should be spaced correctly: "foo()!" +dotnet_diagnostic.SA1009.severity = none + +# Hide warnings when using the new() expression from C# 9. +dotnet_diagnostic.SA1000.severity = none + +dotnet_diagnostic.SA1011.severity = none +dotnet_diagnostic.SA1101.severity = none + +# Hide warnings when accessing properties without "this". +dotnet_diagnostic.SA1101.severity = none +dotnet_diagnostic.SA1118.severity = none +dotnet_diagnostic.SA1200.severity = none +dotnet_diagnostic.SA1201.severity = none +dotnet_diagnostic.SA1202.severity = none +dotnet_diagnostic.SA1309.severity = none +dotnet_diagnostic.SA1310.severity = none + +# Hide warnings for record parameters. +dotnet_diagnostic.SA1313.severity = none + +# TypeParameterNamesMustBeginWithT: We do have a few templates that don't start with T. We need to double check that changing this is not a breaking change. If not, we can re-enable this. +dotnet_diagnostic.SA1314.severity = none + +# UseTrailingCommasInMultiLineInitializers: This would also mean a lot of changes at the end of all multiline initializers. It's also debatable if we want this or not. +dotnet_diagnostic.SA1413.severity = none + +dotnet_diagnostic.SA1600.severity = none +dotnet_diagnostic.SA1602.severity = none +dotnet_diagnostic.SA1611.severity = none + +# DocumentationTextMustEndWithAPeriod: Let's enable this rule back when we shift to WinUI3 (v8.x). If we do it now, it would mean more than 400 file changes. +dotnet_diagnostic.SA1629.severity = none + +dotnet_diagnostic.SA1633.severity = none +dotnet_diagnostic.SA1634.severity = none +dotnet_diagnostic.SA1652.severity = none +csharp_using_directive_placement = outside_namespace:silent +csharp_prefer_simple_using_statement = true:suggestion +csharp_style_namespace_declarations = file_scoped:warning +csharp_style_expression_bodied_local_functions = false:silent +csharp_style_prefer_null_check_over_type_check = true:suggestion +csharp_style_prefer_local_over_anonymous_function = true:suggestion +csharp_style_prefer_index_operator = true:suggestion +csharp_style_prefer_range_operator = true:suggestion +csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion +csharp_style_prefer_tuple_swap = true:suggestion +csharp_style_unused_value_assignment_preference = discard_variable:suggestion +csharp_style_unused_value_expression_statement_preference = discard_variable:silent +csharp_prefer_static_local_function = true:suggestion +csharp_style_allow_embedded_statements_on_same_line_experimental = true:silent +csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent +csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true:silent +csharp_style_prefer_pattern_matching = true:silent +csharp_style_prefer_switch_expression = true:suggestion +csharp_style_prefer_not_pattern = true:suggestion +csharp_style_prefer_extended_property_pattern = true:suggestion + +# Require file header +dotnet_diagnostic.IDE0073.severity = warning + +# Uno platform exposes IDisposable on Storyboard publicly when it should be internal. Ignore this. +dotnet_code_quality.CA1001.excluded_type_names_with_derived_types = T:Windows.UI.Xaml.Media.Animation.Storyboard diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..7d994da9 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,199 @@ + +# https://docs.github.com/actions/using-workflows/about-workflows +# https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions + +name: CI + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the main branch + push: + branches: [ main ] + pull_request: + branches: [ main ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +env: + DOTNET_VERSION: ${{ '6.0.x' }} + ENABLE_DIAGNOSTICS: false + #COREHOST_TRACE: 1 + COREHOST_TRACEFILE: corehosttrace.log + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "Xaml-Style-Check" + Xaml-Style-Check: + runs-on: windows-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - name: Install .NET SDK v${{ env.DOTNET_VERSION }} + uses: actions/setup-dotnet@v3 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Checkout Repository + uses: actions/checkout@v3 + with: + submodules: recursive + + # Restore Tools from Manifest list in the Repository + - name: Restore dotnet tools + run: dotnet tool restore + + - name: Check XAML Styling + run: powershell -version 5.1 -command "./ApplyXamlStyling.ps1 -Passive" -ErrorAction Stop + + # Build both Uno.UI/WinUI2/UWP and Uno.WinUI/WinUI3/WindowsAppSDK versions of our packages using a matrix + build: + needs: [Xaml-Style-Check] + runs-on: windows-latest + + # See https://docs.github.com/actions/using-jobs/using-a-matrix-for-your-jobs + strategy: + fail-fast: false # prevent one matrix pipeline from being cancelled if one fails, we want them both to run to completion. + matrix: + platform: [WinUI2, WinUI3] + + env: + MULTI_TARGET_DIRECTORY: tooling/MultiTarget + # faux-ternary expression to select which platforms to build for each platform vs. duplicating step below. + TARGET_PLATFORMS: ${{ matrix.platform != 'WinUI3' && 'all' || 'all-uwp' }} + TEST_PLATFORM: ${{ matrix.platform != 'WinUI3' && 'UWP' || 'WinAppSdk' }} + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - name: Install .NET SDK v${{ env.DOTNET_VERSION }} + uses: actions/setup-dotnet@v3 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + + - name: .NET Info (if diagnostics) + if: ${{ env.ENABLE_DIAGNOSTICS == 'true' }} + run: dotnet --info + + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Checkout Repository + uses: actions/checkout@v3 + with: + submodules: recursive + + # Restore Tools from Manifest list in the Repository + - name: Restore dotnet tools + run: dotnet tool restore + + - name: Run Uno Check to Install Dependencies + run: dotnet tool run uno-check --ci --fix --non-interactive --skip wsl --skip androidemulator --verbose + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.3.1 + + - name: Enable ${{ env.TARGET_PLATFORMS }} TargetFrameworks + working-directory: ./${{ env.MULTI_TARGET_DIRECTORY }} + run: powershell -version 5.1 -command "./UseTargetFrameworks.ps1 ${{ env.TARGET_PLATFORMS }}" -ErrorAction Stop + + - name: Generate solution w/ ${{ env.TEST_PLATFORM }} Tests + working-directory: ./ + run: powershell -version 5.1 -command "./tooling/GenerateAllSolution.ps1 -IncludeHeads ${{ env.TEST_PLATFORM }}${{ env.ENABLE_DIAGNOSTICS == 'true' && ' -UseDiagnostics' || '' }}" -ErrorAction Stop + + - name: Enable Uno.WinUI (in WinUI3 matrix only) + working-directory: ./${{ env.MULTI_TARGET_DIRECTORY }} + run: powershell -version 5.1 -command "./UseUnoWinUI.ps1 3" -ErrorAction Stop + if: ${{ matrix.platform == 'WinUI3' }} + + - name: MSBuild + run: msbuild.exe CommunityToolkit.AllComponents.sln /restore /nowarn:MSB4011 -p:Configuration=Release + + # Build All Packages + - name: pack experiments + working-directory: ./tooling/Scripts/ + run: ./PackEachExperiment.ps1 all + + # Push Packages to our DevOps Artifacts Feed + - name: Add source + if: ${{ github.ref == 'refs/heads/main' }} + run: dotnet nuget add source "https://pkgs.dev.azure.com/dotnet/CommunityToolkit/_packaging/CommunityToolkit-Labs/nuget/v3/index.json" --name LabsFeed --username dummy --password ${{ secrets.DEVOPS_PACKAGE_PUSH_TOKEN }} + + - name: Push packages + if: ${{ github.ref == 'refs/heads/main' }} + run: dotnet nuget push "**/*.nupkg" --api-key dummy --source LabsFeed --skip-duplicate + + # Run tests + - name: Setup VSTest Path + uses: darenm/Setup-VSTest@v1 + + - name: Install Testspace Module + uses: testspace-com/setup-testspace@v1 + with: + domain: ${{ github.repository_owner }} + + - name: Run SourceGenerators tests + id: test-generator + run: vstest.console.exe ./tooling/CommunityToolkit.Tooling.SampleGen.Tests/bin/Release/net6.0/CommunityToolkit.Tooling.SampleGen.Tests.dll /logger:"trx;LogFileName=SourceGenerators.trx" + + - name: Run experiment tests against ${{ env.TEST_PLATFORM }} + id: test-platform + run: vstest.console.exe ./tooling/**/CommunityToolkit.Tests.${{ env.TEST_PLATFORM }}.build.appxrecipe /Framework:FrameworkUap10 /logger:"trx;LogFileName=${{ env.TEST_PLATFORM }}.trx" + + - name: Create test reports + run: | + testspace '[${{ matrix.platform }}]./TestResults/*.trx' + if: ${{ always() && (steps.test-generator.conclusion == 'success' || steps.test-platform.conclusion == 'success') }} + + - name: Artifact - Diagnostic Logs + uses: actions/upload-artifact@v3 + if: ${{ (env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '') && always() }} + with: + name: build-logs + path: ./**/*.*log + + wasm-linux: + runs-on: ubuntu-latest + env: + HEADS_DIRECTORY: tooling/ProjectHeads + + steps: + - name: Install .NET SDK v${{ env.DOTNET_VERSION }} + uses: actions/setup-dotnet@v3 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + + - name: .NET Info (if diagnostics) + if: ${{ env.ENABLE_DIAGNOSTICS == 'true' }} + run: dotnet --info + + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Checkout Repository + uses: actions/checkout@v3 + with: + submodules: recursive + + # Restore Tools from Manifest list in the Repository + - name: Restore dotnet tools + run: dotnet tool restore + + - name: Generate solution + shell: pwsh + working-directory: ./ + run: ./tooling/GenerateAllSolution.ps1${{ env.ENABLE_DIAGNOSTICS == 'true' && ' -UseDiagnostics' || '' }} + + - name: Install ninja for WASM native dependencies + run: sudo apt-get install ninja-build + + # Issue with Comment Links currently, see: https://github.com/mrlacey/CommentLinks/issues/38 + # See launch.json configuration file for analogous command we're emulating here to build LINK: ../../.vscode/launch.json:CommunityToolkit.App.Wasm.csproj + - name: dotnet build + working-directory: ./${{ env.HEADS_DIRECTORY }}/AllComponents/Wasm/ + run: dotnet build /r /bl /p:UnoSourceGeneratorUseGenerationHost=true /p:UnoSourceGeneratorUseGenerationController=false + + # TODO: Do we want to run tests here? Can we do that on linux easily? + + - name: Artifact - Diagnostic Logs + uses: actions/upload-artifact@v3 + if: ${{ (env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '') && always() }} + with: + name: linux-logs + path: ./**/*.*log diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..b4d83854 --- /dev/null +++ b/.gitignore @@ -0,0 +1,364 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ +*.g.cs + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +**/nuget.exe +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# JetBrains Rider files +.idea/ + +# Community Toolkit Labs generated files +CommunityToolkit.AllComponents.sln +tooling/MultiTarget/Generated/** +heads/ + +# We use slngen to generate solutions +*.sln diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..6d9514c1 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "fernandoescolar.vscode-solution-explorer", + ] +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..421e0cd0 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,37 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "All samples app", + "type": "coreclr", + "request": "launch", + "program": "dotnet", + "args": [ + "run", + "build", + "/r", + "/bl", + "/p:UnoSourceGeneratorUseGenerationHost=true", + "/p:UnoSourceGeneratorUseGenerationController=false", + "/p:UnoRemoteControlPort=443", + "--project=${workspaceFolder}/tooling/ProjectHeads/AllComponents/Wasm/CommunityToolkit.App.Wasm.csproj" + ], + "presentation": { + "group": "1", + "order": 1 + }, + "cwd": "${workspaceFolder}/tooling/ProjectHeads/AllComponents/Wasm", + "preLaunchTask": "generateAllSolution" + }, + { + "type": "PowerShell", + "request": "launch", + "name": "Discover samples", + "script": "foreach ($component in Get-ChildItem -Directory -Depth 0 -Path './components/*') { ${workspaceFolder}/tooling/ProjectHeads/GenerateSingleSampleHeads.ps1 -ComponentPath $component } ; ${workspaceFolder}/tooling/GenerateVSCodeLaunchConfig.ps1; ", + "presentation": { + "group": "2", + "order": 2 + } + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..ebc930a7 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,12 @@ +{ + "omnisharp.defaultLaunchSolution": "CommunityToolkit.AllComponents.sln", + "omnisharp.disableMSBuildDiagnosticWarning": true, + "omnisharp.enableRoslynAnalyzers": true, + "omnisharp.useGlobalMono": "never", + "csharp.suppressBuildAssetsNotification": true, + "csharp.suppressDotnetInstallWarning": true, + "csharp.suppressDotnetRestoreNotification": true, + "csharp.semanticHighlighting.enabled": true, + "omnisharp.enableImportCompletion": true, + "omnisharp.enableMsBuildLoadProjectsOnDemand": true +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000..c3709f67 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,13 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "generateAllSolution", + "type": "shell", + "command": "pwsh ./tooling/GenerateAllSolution.ps1", + "group": "build" + } + ] +} \ No newline at end of file diff --git a/.vsconfig b/.vsconfig new file mode 100644 index 00000000..b66e85b5 --- /dev/null +++ b/.vsconfig @@ -0,0 +1,94 @@ +{ + "version": "1.0", + "components": [ + "Microsoft.VisualStudio.Component.CoreEditor", + "Microsoft.VisualStudio.Workload.CoreEditor", + "Microsoft.NetCore.Component.Runtime.3.1", + "Microsoft.NetCore.Component.SDK", + "Microsoft.VisualStudio.Component.NuGet", + "Microsoft.VisualStudio.Component.Roslyn.Compiler", + "Microsoft.VisualStudio.Component.Roslyn.LanguageServices", + "Microsoft.NetCore.Component.DevelopmentTools", + "Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions", + "Microsoft.VisualStudio.Component.DockerTools", + "Microsoft.NetCore.Component.Web", + "Microsoft.Net.ComponentGroup.DevelopmentPrerequisites", + "Microsoft.VisualStudio.Component.TypeScript.4.0", + "Microsoft.VisualStudio.Component.JavaScript.TypeScript", + "Microsoft.VisualStudio.Component.JavaScript.Diagnostics", + "Microsoft.Component.MSBuild", + "Microsoft.VisualStudio.Component.TextTemplating", + "Component.Microsoft.VisualStudio.RazorExtension", + "Microsoft.VisualStudio.Component.IISExpress", + "Microsoft.VisualStudio.Component.SQL.ADAL", + "Microsoft.VisualStudio.Component.SQL.LocalDB.Runtime", + "Microsoft.VisualStudio.Component.Common.Azure.Tools", + "Microsoft.VisualStudio.Component.SQL.CLR", + "Microsoft.VisualStudio.Component.MSODBC.SQL", + "Microsoft.VisualStudio.Component.MSSQL.CMDLnUtils", + "Microsoft.VisualStudio.Component.ManagedDesktop.Core", + "Microsoft.VisualStudio.Component.SQL.SSDT", + "Microsoft.VisualStudio.Component.SQL.DataSources", + "Component.Microsoft.Web.LibraryManager", + "Microsoft.VisualStudio.ComponentGroup.Web", + "Microsoft.VisualStudio.Component.Web", + "Microsoft.VisualStudio.Component.IntelliCode", + "Component.Microsoft.VisualStudio.LiveShare", + "Microsoft.VisualStudio.ComponentGroup.Web.Client", + "Microsoft.Net.ComponentGroup.TargetingPacks.Common", + "Component.Microsoft.VisualStudio.Web.AzureFunctions", + "Microsoft.VisualStudio.ComponentGroup.AzureFunctions", + "Microsoft.VisualStudio.Component.Azure.Compute.Emulator", + "Microsoft.VisualStudio.Component.Azure.Storage.Emulator", + "Microsoft.VisualStudio.Component.Azure.ClientLibs", + "Microsoft.VisualStudio.Component.Azure.AuthoringTools", + "Microsoft.VisualStudio.Component.CloudExplorer", + "Microsoft.VisualStudio.ComponentGroup.Web.CloudTools", + "Microsoft.VisualStudio.Component.DiagnosticTools", + "Microsoft.VisualStudio.Component.EntityFramework", + "Microsoft.VisualStudio.Component.AspNet45", + "Microsoft.VisualStudio.Component.AppInsights.Tools", + "Microsoft.VisualStudio.Component.WebDeploy", + "Microsoft.VisualStudio.Workload.NetWeb", + "Microsoft.VisualStudio.ComponentGroup.Azure.Prerequisites", + "Microsoft.VisualStudio.Component.Azure.Waverton.BuildTools", + "Microsoft.VisualStudio.Component.Azure.Waverton", + "Microsoft.Component.Azure.DataLake.Tools", + "Microsoft.VisualStudio.Component.Azure.Kubernetes.Tools", + "Microsoft.VisualStudio.Component.Azure.ResourceManager.Tools", + "Microsoft.VisualStudio.ComponentGroup.Azure.ResourceManager.Tools", + "Microsoft.VisualStudio.ComponentGroup.Azure.CloudServices", + "Microsoft.VisualStudio.Component.Azure.ServiceFabric.Tools", + "Microsoft.VisualStudio.Workload.Azure", + "Microsoft.VisualStudio.Component.VC.CoreIde", + "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", + "Microsoft.VisualStudio.Component.Graphics.Tools", + "Microsoft.VisualStudio.Component.Windows10SDK.19041", + "Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites", + "Microsoft.ComponentGroup.Blend", + "Microsoft.VisualStudio.Component.Debugger.JustInTime", + "Microsoft.VisualStudio.ComponentGroup.MSIX.Packaging", + "Microsoft.VisualStudio.Workload.ManagedDesktop", + "Microsoft.VisualStudio.Component.Windows10SDK.18362", + "Microsoft.Component.NetFX.Native", + "Microsoft.VisualStudio.ComponentGroup.UWP.NetCoreAndStandard", + "Microsoft.VisualStudio.Component.Graphics", + "Microsoft.VisualStudio.ComponentGroup.UWP.Xamarin", + "Microsoft.VisualStudio.ComponentGroup.UWP.Support", + "Microsoft.VisualStudio.Component.VC.Tools.ARM64", + "Microsoft.VisualStudio.Component.UWP.VC.ARM64", + "Microsoft.VisualStudio.Component.VC.Tools.ARM", + "Microsoft.VisualStudio.ComponentGroup.UWP.VC", + "Microsoft.VisualStudio.Workload.Universal", + "Component.OpenJDK", + "Microsoft.VisualStudio.Component.MonoDebugger", + "Microsoft.VisualStudio.Component.Merq", + "Component.Xamarin.RemotedSimulator", + "Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions.TemplateEngine", + "Component.Xamarin", + "Component.Android.SDK28", + "Microsoft.VisualStudio.Workload.NetCrossPlat", + "Microsoft.VisualStudio.Workload.NetCoreTools", + "Microsoft.VisualStudio.ComponentGroup.Maui.All", + ] +} diff --git a/ApplyXamlStyling.ps1 b/ApplyXamlStyling.ps1 new file mode 100644 index 00000000..06359b14 --- /dev/null +++ b/ApplyXamlStyling.ps1 @@ -0,0 +1,128 @@ +<# + .SYNOPSIS + Modify XAML files to adhere to XAML Styler settings. + + .DESCRIPTION + The Apply XAML Stying Script can be used to check or modify XAML files with the repo's XAML Styler settings. + Learn more about XAML Styler at https://github.com/Xavalon/XamlStyler + + By default, uses git status to check all new or modified files. + + Use "PS> Help .\ApplyXamlStyling.ps1 -Full" for more details on parameters. + + .PARAMETER LastCommit + Runs against last commit vs. current changes + + .PARAMETER Unstaged + Runs against unstaged changed files + + .PARAMETER Staged + Runs against staged files vs. current changes + + .PARAMETER Main + Runs against main vs. current branch + + .PARAMETER Passive + Runs a passive check against all files in the repo for the CI + + .EXAMPLE + PS> .\ApplyXamlStyling.ps1 -Main +#> +param( + [switch]$LastCommit = $false, + [switch]$Unstaged = $false, + [switch]$Staged = $false, + [switch]$Main = $false, + [switch]$Passive = $false +) + +Write-Output "Use 'Help .\ApplyXamlStyling.ps1' for more info or '-Main' to run against all files." +Write-Output "" +Write-Output "Restoring dotnet tools..." +dotnet tool restore + +if (-not $Passive) +{ + # Look for unstaged changed files by default + $gitDiffCommand = "git status -s --porcelain" + + if ($Main) + { + Write-Output 'Checking Current Branch against `main` Files Only' + $branch = git status | Select-String -Pattern "On branch (?.*)$" + if ($null -eq $branch.Matches) + { + $branch = git status | Select-String -Pattern "HEAD detached at (?.*)$" + if ($null -eq $branch.Matches) + { + Write-Error 'Don''t know how to fetch branch from `git status`:' + git status | Write-Error + exit 1 + } + } + $branch = $branch.Matches.groups[1].Value + $gitDiffCommand = "git diff origin/main $branch --name-only --diff-filter=ACM" + } + elseif ($Unstaged) + { + # Look for unstaged files + Write-Output "Checking Unstaged Files" + $gitDiffCommand = "git diff --name-only --diff-filter=ACM" + } + elseif ($Staged) + { + # Look for staged files + Write-Output "Checking Staged Files Only" + $gitDiffCommand = "git diff --cached --name-only --diff-filter=ACM" + } + elseif ($LastCommit) + { + # Look at last commit files + Write-Output "Checking the Last Commit's Files Only" + $gitDiffCommand = "git diff HEAD^ HEAD --name-only --diff-filter=ACM" + } + else + { + Write-Output "Checking Git Status Files Only" + } + + Write-Output "Running Git Diff: $gitDiffCommand" + $files = Invoke-Expression $gitDiffCommand | Select-String -Pattern "\.xaml$" + + if (-not $Passive -and -not $Main -and -not $Unstaged -and -not $Staged -and -not $LastCommit) + { + # Remove 'status' column of 3 characters at beginning of lines + $files = $files | ForEach-Object { $_.ToString().Substring(3) } + } + + if ($files.count -gt 0) + { + dotnet tool run xstyler -c .\settings.xamlstyler -f $files + } + else + { + Write-Output "No XAML Files found to style..." + } +} +else +{ + Write-Output "Checking all files (passively)" + $files = Get-ChildItem *.xaml -Recurse | Select-Object -ExpandProperty FullName | Where-Object { $_ -notmatch "(\\obj\\)|(\\bin\\)" } + + if ($files.count -gt 0) + { + dotnet tool run xstyler -p -c .\settings.xamlstyler -f $files + + if ($lastExitCode -eq 1) + { + Write-Error 'XAML Styling is incorrect, please run `ApplyXamlStyling.ps1 -Main` locally.' + } + + # Return XAML Styler Status + exit $lastExitCode + } + else + { + exit 0 + } +} diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..1f377cc3 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,76 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at conduct@dotnetfoundation.org. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see + diff --git a/Contributing.md b/Contributing.md new file mode 100644 index 00000000..8a1ab74f --- /dev/null +++ b/Contributing.md @@ -0,0 +1,46 @@ +# ✨ Contributing to the Windows Community Toolkit + +Thank you for exhibiting interest in contributing to the Windows Community Toolkit. The team is delighted to welcome you onboard to our exciting and growing project. Any contribution or value added go a long way to enhance the project! + +In the next few steps, you will be able to see a glimpse of ways you can contribute to the Windows Community Toolkit. + +🚨 **It is highly recommended to visit [Windows Community Toolkit Wiki](https://aka.ms/wct/wiki) where you can find complete and detail-oriented content of this page** 🚨 + +## ❔ Questions + +Due to the high volume of incoming issues please keep our GitHub issues for bug reports. For general questions, use [Discussions](https://github.com/CommunityToolkit/Windows/discussions) or there is a higher chance of getting your question answered on [StackOverflow](https://stackoverflow.com/questions/tagged/windows-community-toolkit) where questions should be tagged with the tag `windows-community-toolkit`. + +For missing documentation related question, please file an issue at [Microsoft Docs](https://github.com/MicrosoftDocs/CommunityToolkit/issues). + +## πŸ› Fix a Bug + +If you find any bug, you can help the community by [submitting an issue](https://github.com/CommunityToolkit/Windows/issues/new?template=bug_report.md&labels=bug+:bug:&title=[Bug]). Once the issue is filed, feel free to start working on the PR and submit a PR. + +## πŸ‘Œ Good First Issue + +If this is your first time contributing to the Windows Community Toolkit (_WCT_) and do not have advanced level programming experience, we have got you covered πŸ’₯ WCT has a list of [good first issue](https://github.com/CommunityToolkit/Windows/labels/good%20first%20issue) that can be a great entryway to find and fix any issues that best fit your expertise or technical background. + +## πŸ™‹ Help Wanted + +WCT also has a list of issues that are labeled as [help wanted](https://github.com/CommunityToolkit/Windows/labels/help%20wanted). The level of complexity in the list can vary but if you have an advanced level of programming experience, feel free to jump in to solve these issues. + +## πŸ“¬ Add New Feature + +* To contribute a new feature, fill out the [Feature Request Template](https://github.com/CommunityToolkit/Labs-Windows/discussions) in our Labs Discussions and provide detailed information to express your idea or proposal. +* Once the Feature Request is submitted, it will be open for discussion. +* If it gets approved by the team, proceed to submit a PR of the proposed Feature. +* If the PR contains an error-free code and the reviewer signs off, the PR will be merged. + +## πŸ“ Add or Improve Documentation + +Due to the involvement of multiple steps to add or improve documents; it is required to visit [Windows Community Toolkit Wiki](https://aka.ms/wct/wiki) and follow contribution guidelines. + +## πŸš€ Create, Submit or Review Pull Request + +Anyone can create a Pull Request by forking the Windows Community Toolkit Repository. Here is how you can [Create a Pull Request from fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork). Once you fork the Windows Community Toolkit repo, it is essential to create all changes in the feature branch of your forked repository. If you have the changes in the forked feature branch, you can then create a Pull Request in the main Windows Community Toolkit. + +Please visit [Windows Community Toolkit Wiki](https://aka.ms/wct/wiki) for detailed information and steps it requires to Submit or Review Pull Request. + +## πŸ’™ Thank You + +**Thank you so much for contributing to this amazing project. We hope you will continue to add value and find yourself as a highly reliable source to the Windows Community Toolkit.** diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 00000000..60f0fa95 --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,24 @@ + + + CommunityToolkit + $(MSBuildThisFileDirectory) + $(RepositoryDirectory)\tooling + true + + + + true + true + + + + + + Embedded + bin\Package + .pdb + true + true + + + diff --git a/Directory.Build.targets b/Directory.Build.targets new file mode 100644 index 00000000..af422ceb --- /dev/null +++ b/Directory.Build.targets @@ -0,0 +1,28 @@ + + + + + + + + + $(CommonTags);UWP;WinUI;Uno;Labs;Experimental + $(CommonTags);$(PackageTags) + $(CommonTags) + + + + + + + + + + + + + \ No newline at end of file diff --git a/GenerateAllSolution.bat b/GenerateAllSolution.bat new file mode 100644 index 00000000..e7d3e989 --- /dev/null +++ b/GenerateAllSolution.bat @@ -0,0 +1,5 @@ +@ECHO OFF +SET "IncludeHeads=%1" +IF "%IncludeHeads%"=="" SET "IncludeHeads=all" + +powershell .\tooling\GenerateAllSolution.ps1 -IncludeHeads %IncludeHeads% \ No newline at end of file diff --git a/License.md b/License.md new file mode 100644 index 00000000..5aefa46c --- /dev/null +++ b/License.md @@ -0,0 +1,13 @@ +# Windows Community Toolkit + +Copyright Β© .NET Foundation and Contributors + +All rights reserved. + +## MIT License (MIT) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the β€œSoftware”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/ReadMe.md b/ReadMe.md new file mode 100644 index 00000000..64ed8d16 --- /dev/null +++ b/ReadMe.md @@ -0,0 +1,63 @@ + +# πŸ§ͺ Windows Community Toolkit 🧰 + +![Windows Community Toolkit Labs Social Image](tooling/ToolkitLabsSocial.png) + +Welcome to the home of Windows Community Toolkit. Our components are built on top of WinUI 2, [WinUI 3](https://aka.ms/winui3), and [Uno Platform](https://platform.uno))! + +## Getting Started + +### [Try out our Sample App live in your browser!](https://toolkitlabs.dev) + +Want to see the toolkit in action before jumping into the code? Download and play with the [Windows Community Toolkit Sample App](https://www.microsoft.com/store/apps/9nblggh4tlcq) from the Store. + +Please read the [Getting Started with the Windows Community Toolkit](https://docs.microsoft.com/windows/communitytoolkit/getting-started) page for more detailed information about using the toolkit. + +## Clone the repository + +The [tooling](https://github.com/CommunityToolkit/Tooling-Windows-Submodule) is in a submodule, so you'll need to use `--recurse-submodules` when cloning or pulling for the first time: + +```shell +git clone --recurse-submodules https://github.com/CommunityToolkit/Labs-Windows.git +``` + +## Build Requirements + +- Visual Studio 2022 (UWP & Desktop Workloads for .NET) +- .NET 6 SDK +- Windows App SDK +- Windows SDK 19041 + +## πŸš€ Contribution + +Do you want to contribute? Check out our [Windows Community Toolkit Wiki](https://aka.ms/wct/wiki) page to learn more about contribution and guidelines. + +## πŸ“¦ NuGet Packages + +NuGet is a standard package manager for .NET applications which is built into Visual Studio. When you open solution in Visual Studio, choose the *Tools* menu > *NuGet Package Manager* > *Manage NuGet packages for solution…* Enter one of the package names mentioned in [Windows Community Toolkit NuGet Packages](https://docs.microsoft.com/windows/communitytoolkit/nuget-packages) table to search for it online. + +## πŸ“« Features + +The [Features list](https://github.com/MicrosoftDocs/WindowsCommunityToolkitDocs/blob/master/docs/toc.md#controls) refers to all the currently available features that can be found in the Windows Community Toolkit. Most features should work with the October 2018 Update (1809) SDK 17763 and above; however, refer to specific documentation on each feature for more information. + +## πŸ’  Principles + +1. The toolkit will provide features that are needed for a wide-array of developers, are easy-to-use, and maintainable. +2. As soon as a comparable feature is available in the Windows SDK for Windows, it will be marked as deprecated. +3. We will fix issues forward and stay up-to-date on top of WinUI 2 and 3 updates supporting the minimum OS level that they also support. + +## πŸ“„ Code of Conduct + +This project has adopted the code of conduct defined by the [Contributor Covenant](http://contributor-covenant.org/) +to clarify expected behavior in our community. +For more information see the [.NET Foundation Code of Conduct](CODE_OF_CONDUCT.md). + +## 🏒 .NET Foundation + +This project is supported by the [.NET Foundation](http://dotnetfoundation.org). + +## πŸ† Contributors + +[![Toolkit Contributors](https://contrib.rocks/image?repo=CommunityToolkit/Windows)](https://github.com/CommunityToolkit/Windows/graphs/contributors) + +Made with [contrib.rocks](https://contrib.rocks). diff --git a/Windows.Toolkit.Common.props b/Windows.Toolkit.Common.props new file mode 100644 index 00000000..06c5e8c8 --- /dev/null +++ b/Windows.Toolkit.Common.props @@ -0,0 +1,36 @@ + + + .NET Foundation + Microsoft.Toolkit + Windows Community Toolkit + Windows;Community;Toolkit;WCT + MIT + true + (c) .NET Foundation and Contributors. All rights reserved. + https://github.com/CommunityToolkit/Windows + https://github.com/CommunityToolkit/Windows/releases + Icon.png + https://raw.githubusercontent.com/CommunityToolkit/Windows/main/nuget.png + + $(NoWarn);NU1505;NU1504 + + + + Strict + enable + nullable + latest + en-US + true + + + + true + true + true + + + + + + diff --git a/global.json b/global.json new file mode 100644 index 00000000..1ad7848c --- /dev/null +++ b/global.json @@ -0,0 +1,10 @@ +{ + "sdk": { + "version": "6.0.405", + "rollForward": "latestFeature" + }, + "msbuild-sdks": + { + "MSBuild.Sdk.Extras":"3.0.23" + } +} diff --git a/settings.xamlstyler b/settings.xamlstyler new file mode 100644 index 00000000..6087aa1b --- /dev/null +++ b/settings.xamlstyler @@ -0,0 +1,42 @@ +{ + "AttributesTolerance": 1, + "KeepFirstAttributeOnSameLine": true, + "MaxAttributeCharactersPerLine": 0, + "MaxAttributesPerLine": 1, + "NewlineExemptionElements": "RadialGradientBrush, GradientStop, LinearGradientBrush, ScaleTransform, SkewTransform, RotateTransform, TranslateTransform, Trigger, Condition, Setter", + "SeparateByGroups": false, + "AttributeIndentation": 0, + "AttributeIndentationStyle": 1, + "RemoveDesignTimeReferences": false, + "EnableAttributeReordering": true, + "AttributeOrderingRuleGroups": [ + "x:Class", + "xmlns, xmlns:x", + "xmlns:*", + "x:Key, Key, x:Name, Name, x:Uid, Uid, Title", + "Grid.Row, Grid.RowSpan, Grid.Column, Grid.ColumnSpan, Canvas.Left, Canvas.Top, Canvas.Right, Canvas.Bottom", + "Width, Height, MinWidth, MinHeight, MaxWidth, MaxHeight", + "Margin, Padding, HorizontalAlignment, VerticalAlignment, HorizontalContentAlignment, VerticalContentAlignment, Panel.ZIndex", + "*:*, *", + "PageSource, PageIndex, Offset, Color, TargetName, Property, Value, StartPoint, EndPoint", + "mc:Ignorable, d:IsDataSource, d:LayoutOverrides, d:IsStaticText", + "Storyboard.*, From, To, Duration" + ], + "FirstLineAttributes": "", + "OrderAttributesByName": true, + "PutEndingBracketOnNewLine": false, + "RemoveEndingTagOfEmptyElement": true, + "SpaceBeforeClosingSlash": true, + "RootElementLineBreakRule": 0, + "ReorderVSM": 1, + "ReorderGridChildren": false, + "ReorderCanvasChildren": false, + "ReorderSetters": 0, + "FormatMarkupExtension": true, + "NoNewLineMarkupExtensions": "x:Bind, Binding", + "ThicknessSeparator": 2, + "ThicknessAttributes": "Margin, Padding, BorderThickness, ThumbnailClipMargin", + "FormatOnSave": true, + "CommentPadding": 2, + "IndentSize": 4 +} \ No newline at end of file