diff --git a/.editorconfig b/.editorconfig
deleted file mode 100644
index 2786b81bfd7..00000000000
--- a/.editorconfig
+++ /dev/null
@@ -1,372 +0,0 @@
-# Remove the line below if you want to inherit .editorconfig settings from higher directories
-root = true
-
-# All files
-[*]
-
-#### 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 = unset
-insert_final_newline = false
-
-#### 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
diff --git a/.gitattributes b/.gitattributes
deleted file mode 100644
index 5896c1692ee..00000000000
--- a/.gitattributes
+++ /dev/null
@@ -1,63 +0,0 @@
-###############################################################################
-# Set default behavior to automatically normalize line endings.
-###############################################################################
-* text=auto
-
-###############################################################################
-# Set default behavior for command prompt diff.
-#
-# This is need for earlier builds of msysgit that does not have it on by
-# default for csharp files.
-# Note: This is only used by command line
-###############################################################################
-#*.cs diff=csharp
-
-###############################################################################
-# Set the merge driver for project and solution files
-#
-# Merging from the command prompt will add diff markers to the files if there
-# are conflicts (Merging from VS is not affected by the settings below, in VS
-# the diff markers are never inserted). Diff markers may cause the following
-# file extensions to fail to load in VS. An alternative would be to treat
-# these files as binary and thus will always conflict and require user
-# intervention with every merge. To do so, just uncomment the entries below
-###############################################################################
-#*.sln merge=binary
-#*.csproj merge=binary
-#*.vbproj merge=binary
-#*.vcxproj merge=binary
-#*.vcproj merge=binary
-#*.dbproj merge=binary
-#*.fsproj merge=binary
-#*.lsproj merge=binary
-#*.wixproj merge=binary
-#*.modelproj merge=binary
-#*.sqlproj merge=binary
-#*.wwaproj merge=binary
-
-###############################################################################
-# behavior for image files
-#
-# image files are treated as binary by default.
-###############################################################################
-#*.jpg binary
-#*.png binary
-#*.gif binary
-
-###############################################################################
-# diff behavior for common document formats
-#
-# Convert binary document formats to text before diffing them. This feature
-# is only available from the command line. Turn it on by uncommenting the
-# entries below.
-###############################################################################
-#*.doc diff=astextplain
-#*.DOC diff=astextplain
-#*.docx diff=astextplain
-#*.DOCX diff=astextplain
-#*.dot diff=astextplain
-#*.DOT diff=astextplain
-#*.pdf diff=astextplain
-#*.PDF diff=astextplain
-#*.rtf diff=astextplain
-#*.RTF diff=astextplain
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
deleted file mode 100644
index 05c3432562e..00000000000
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-blank_issues_enabled: false
-contact_links:
- - name: We've moved ➡️
- url: https://github.com/CommunityToolkit/Windows/issues/new/choose
- about: "Please file your issue in the new repository."
- - name: MVVM Toolkit, High Performance, or Diagnostic Package?
- url: https://aka.ms/toolkit/dotnet
- about: "If you have a question on these, see the .NET Community Toolkit repo:"
-
\ No newline at end of file
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 1e58aae54c8..00000000000
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-
-
-
-
-
-
-## Fixes
-
-
-
-
-
-## PR Type
-
-What kind of change does this PR introduce?
-
-
-
-
-
-
-
-
-
-
-
-
-## What is the current behavior?
-
-
-
-## What is the new behavior?
-
-
-
-## PR Checklist
-
-Please check if your PR fulfills the following requirements:
-
-- [ ] Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
-- [ ] Based off latest main branch of toolkit
-- [ ] Tested code with current [supported SDKs](../#supported)
-- [ ] New component
- - [ ] Pull Request has been submitted to the documentation repository [instructions](../blob/main/Contributing.md#docs). Link:
- - [ ] Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
- - [ ] If control, added to Visual Studio Design project
-- [ ] Sample in sample app has been added / updated (for bug fixes / features)
- - [ ] Icon has been created (if new sample) following the [Thumbnail Style Guide and templates](https://github.com/CommunityToolkit/WindowsCommunityToolkit-design-assets)
-- [ ] New major technical changes in the toolkit have or will be added to the [Wiki](https://github.com/CommunityToolkit/WindowsCommunityToolkit/wiki) e.g. build changes, source generators, testing infrastructure, sample creation changes, etc...
-- [ ] Tests for the changes have been added (for bug fixes / features) (if applicable)
-- [ ] Header has been added to all new source files (run _build/UpdateHeaders.bat_)
-- [ ] Contains **NO** breaking changes
-
-
-
-## Other information
-
-
diff --git a/.github/fabricbot.json b/.github/fabricbot.json
deleted file mode 100644
index 4d8372e7c8a..00000000000
--- a/.github/fabricbot.json
+++ /dev/null
@@ -1,3600 +0,0 @@
-{
- "version": "1.0",
- "tasks": [
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "IssuesOnlyResponder",
- "version": "1.0",
- "config": {
- "taskName": "Add needs triage and bug label to new issues",
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "name": "isAction",
- "parameters": {
- "action": "opened"
- }
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "isPartOfProject",
- "parameters": {}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "isAssignedToSomeone",
- "parameters": {}
- }
- ]
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "bug :bug:",
- "action": "labeled"
- }
- }
- ]
- },
- "actions": [
- {
- "name": "addLabel",
- "parameters": {
- "label": "needs triage :mag:"
- }
- },
- {
- "name": "addReply",
- "parameters": {
- "comment": "Hello ${issueAuthor}, thank you for opening an issue with us! \n\nI have automatically added a \"needs triage\" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌"
- }
- }
- ],
- "eventType": "issue",
- "eventNames": [
- "issues",
- "project_card"
- ]
- },
- "id": "Ug8NTF6U0"
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "IssueCommentResponder",
- "version": "1.0",
- "config": {
- "taskName": "Replace needs author feedback label with needs attention label when the author comments on an issue",
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "name": "isAction",
- "parameters": {
- "action": "created"
- }
- },
- {
- "name": "isActivitySender",
- "parameters": {
- "user": {
- "type": "author"
- }
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "needs author feedback :memo:"
- }
- },
- {
- "name": "isOpen",
- "parameters": {}
- }
- ]
- },
- "actions": [
- {
- "name": "addLabel",
- "parameters": {
- "label": "needs attention :wave:"
- }
- },
- {
- "name": "removeLabel",
- "parameters": {
- "label": "needs author feedback :memo:"
- }
- }
- ],
- "eventType": "issue",
- "eventNames": [
- "issue_comment"
- ]
- },
- "id": "xMZo45Bhio"
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "IssuesOnlyResponder",
- "version": "1.0",
- "config": {
- "taskName": "Remove no recent activity label from issues",
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "operator": "not",
- "operands": [
- {
- "name": "isAction",
- "parameters": {
- "action": "closed"
- }
- }
- ]
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "no-recent-activity :chart_with_downwards_trend:"
- }
- },
- {
- "name": "isAction",
- "parameters": {
- "action": "edited"
- }
- }
- ]
- },
- "actions": [
- {
- "name": "removeLabel",
- "parameters": {
- "label": "no-recent-activity :chart_with_downwards_trend:"
- }
- }
- ],
- "eventType": "issue",
- "eventNames": [
- "issues",
- "project_card"
- ]
- },
- "id": "C-2hdyxtTy"
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "IssueCommentResponder",
- "version": "1.0",
- "config": {
- "taskName": "Remove no recent activity label when an issue is commented on",
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "no-recent-activity :chart_with_downwards_trend:"
- }
- }
- ]
- },
- "actions": [
- {
- "name": "removeLabel",
- "parameters": {
- "label": "no-recent-activity :chart_with_downwards_trend:"
- }
- }
- ],
- "eventType": "issue",
- "eventNames": [
- "issue_comment"
- ]
- },
- "id": "np5y4Gnerx"
- },
- {
- "taskType": "scheduled",
- "capabilityId": "ScheduledSearch",
- "subCapability": "ScheduledSearch",
- "version": "1.1",
- "config": {
- "taskName": "Close stale issues",
- "frequency": [
- {
- "weekDay": 0,
- "hours": [
- 2,
- 5,
- 8,
- 11,
- 14,
- 17,
- 20,
- 23
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 1,
- "hours": [
- 2,
- 5,
- 8,
- 11,
- 14,
- 17,
- 20,
- 23
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 2,
- "hours": [
- 2,
- 5,
- 8,
- 11,
- 14,
- 17,
- 20,
- 23
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 3,
- "hours": [
- 2,
- 5,
- 8,
- 11,
- 14,
- 17,
- 20,
- 23
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 4,
- "hours": [
- 2,
- 5,
- 8,
- 11,
- 14,
- 17,
- 20,
- 23
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 5,
- "hours": [
- 2,
- 5,
- 8,
- 11,
- 14,
- 17,
- 20,
- 23
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 6,
- "hours": [
- 2,
- 5,
- 8,
- 11,
- 14,
- 17,
- 20,
- 23
- ],
- "timezoneOffset": -8
- }
- ],
- "searchTerms": [
- {
- "name": "isIssue",
- "parameters": {}
- },
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "needs author feedback :memo:"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "no-recent-activity :chart_with_downwards_trend:"
- }
- },
- {
- "name": "noActivitySince",
- "parameters": {
- "days": 30
- }
- }
- ],
- "actions": [
- {
- "name": "addReply",
- "parameters": {
- "comment": "${issueAuthor} This issue has been automatically closed because it was marked as requiring author feedback but has not had any activity for over **45 days**."
- }
- },
- {
- "name": "closeIssue",
- "parameters": {}
- }
- ]
- },
- "id": "Q4RXkBuc7S"
- },
- {
- "taskType": "scheduled",
- "capabilityId": "ScheduledSearch",
- "subCapability": "ScheduledSearch",
- "version": "1.1",
- "config": {
- "taskName": "Add no recent activity label to issues",
- "frequency": [
- {
- "weekDay": 0,
- "hours": [
- 2,
- 5,
- 8,
- 11,
- 14,
- 17,
- 20,
- 23
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 1,
- "hours": [
- 2,
- 5,
- 8,
- 11,
- 14,
- 17,
- 20,
- 23
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 2,
- "hours": [
- 2,
- 5,
- 8,
- 11,
- 14,
- 17,
- 20,
- 23
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 3,
- "hours": [
- 2,
- 5,
- 8,
- 11,
- 14,
- 17,
- 20,
- 23
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 4,
- "hours": [
- 2,
- 5,
- 8,
- 11,
- 14,
- 17,
- 20,
- 23
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 5,
- "hours": [
- 2,
- 5,
- 8,
- 11,
- 14,
- 17,
- 20,
- 23
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 6,
- "hours": [
- 2,
- 5,
- 8,
- 11,
- 14,
- 17,
- 20,
- 23
- ],
- "timezoneOffset": -8
- }
- ],
- "searchTerms": [
- {
- "name": "isIssue",
- "parameters": {}
- },
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "needs author feedback :memo:"
- }
- },
- {
- "name": "noActivitySince",
- "parameters": {
- "days": 15
- }
- },
- {
- "name": "noLabel",
- "parameters": {
- "label": "no-recent-activity :chart_with_downwards_trend:"
- }
- }
- ],
- "actions": [
- {
- "name": "addLabel",
- "parameters": {
- "label": "no-recent-activity :chart_with_downwards_trend:"
- }
- },
- {
- "name": "addReply",
- "parameters": {
- "comment": "${issueAuthor} This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **15 days**. It will be closed if no further activity occurs **within 30 days of this comment**."
- }
- }
- ]
- },
- "id": "7RFazEvfUl"
- },
- {
- "taskType": "scheduled",
- "capabilityId": "ScheduledSearch",
- "subCapability": "ScheduledSearch",
- "version": "1.1",
- "config": {
- "taskName": "Close duplicate issues",
- "frequency": [
- {
- "weekDay": 0,
- "hours": [
- 0,
- 3,
- 6,
- 9,
- 12,
- 15,
- 18,
- 21
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 1,
- "hours": [
- 0,
- 3,
- 6,
- 9,
- 12,
- 15,
- 18,
- 21
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 2,
- "hours": [
- 0,
- 3,
- 6,
- 9,
- 12,
- 15,
- 18,
- 21
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 3,
- "hours": [
- 0,
- 3,
- 6,
- 9,
- 12,
- 15,
- 18,
- 21
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 4,
- "hours": [
- 0,
- 3,
- 6,
- 9,
- 12,
- 15,
- 18,
- 21
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 5,
- "hours": [
- 0,
- 3,
- 6,
- 9,
- 12,
- 15,
- 18,
- 21
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 6,
- "hours": [
- 0,
- 3,
- 6,
- 9,
- 12,
- 15,
- 18,
- 21
- ],
- "timezoneOffset": -8
- }
- ],
- "searchTerms": [
- {
- "name": "isIssue",
- "parameters": {}
- },
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "duplicate :busts_in_silhouette:"
- }
- },
- {
- "name": "noActivitySince",
- "parameters": {
- "days": 1
- }
- }
- ],
- "actions": [
- {
- "name": "addReply",
- "parameters": {
- "comment": "This issue has been marked as duplicate and has not had any activity for **1 day**. It will be closed for housekeeping purposes."
- }
- },
- {
- "name": "closeIssue",
- "parameters": {}
- }
- ]
- },
- "id": "p6t3pVDqNP"
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "IssuesOnlyResponder",
- "version": "1.0",
- "id": "RKZiW8qGn",
- "config": {
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "name": "isAction",
- "parameters": {
- "action": "opened"
- }
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "isPartOfProject",
- "parameters": {}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "isAssignedToSomeone",
- "parameters": {}
- }
- ]
- },
- {
- "name": "hasLabel",
- "parameters": {
- "titlePattern": "Feature",
- "label": "feature request :mailbox_with_mail:"
- }
- }
- ]
- },
- "eventType": "issue",
- "eventNames": [
- "issues",
- "project_card"
- ],
- "taskName": "Add Voting to new Feature Requests",
- "actions": [
- {
- "name": "addReactionToIssue",
- "parameters": {
- "reaction": "+1"
- }
- },
- {
- "name": "addReply",
- "parameters": {
- "comment": "Hello, '${issueAuthor}! Thanks for submitting a new feature request. I've automatically added a vote 👍 reaction to help get things started. Other community members can vote to help us prioritize this feature in the future!"
- }
- }
- ]
- }
- },
- {
- "taskType": "scheduled",
- "capabilityId": "ScheduledSearch",
- "subCapability": "ScheduledSearch",
- "version": "1.1",
- "id": "UKDU95B_x",
- "config": {
- "frequency": [
- {
- "weekDay": 0,
- "hours": [
- 2,
- 5,
- 8,
- 11,
- 14,
- 17,
- 20,
- 23
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 1,
- "hours": [
- 2,
- 5,
- 8,
- 11,
- 14,
- 17,
- 20,
- 23
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 2,
- "hours": [
- 2,
- 5,
- 8,
- 11,
- 14,
- 17,
- 20,
- 23
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 3,
- "hours": [
- 2,
- 5,
- 8,
- 11,
- 14,
- 17,
- 20,
- 23
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 4,
- "hours": [
- 2,
- 5,
- 8,
- 11,
- 14,
- 17,
- 20,
- 23
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 5,
- "hours": [
- 2,
- 5,
- 8,
- 11,
- 14,
- 17,
- 20,
- 23
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 6,
- "hours": [
- 2,
- 5,
- 8,
- 11,
- 14,
- 17,
- 20,
- 23
- ],
- "timezoneOffset": -8
- }
- ],
- "searchTerms": [
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "name": "isIssue",
- "parameters": {}
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "needs triage :mag:"
- }
- },
- {
- "name": "noActivitySince",
- "parameters": {
- "days": 15
- }
- }
- ],
- "taskName": "Issue needs attention ",
- "actions": [
- {
- "name": "addLabel",
- "parameters": {
- "label": "needs attention :wave:"
- }
- },
- {
- "name": "addReply",
- "parameters": {
- "comment": "This issue has been marked as \"needs attention 👋\" due to no activity for **15 days**. Please triage the issue so the fix can be established. "
- }
- }
- ]
- }
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "PullRequestResponder",
- "version": "1.0",
- "id": "aA0KsNooK",
- "config": {
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "name": "isAction",
- "parameters": {
- "action": "opened"
- }
- }
- ]
- },
- "eventType": "pull_request",
- "eventNames": [
- "pull_request",
- "issues",
- "project_card"
- ],
- "taskName": "Opened Pull Request",
- "actions": [
- {
- "name": "addReply",
- "parameters": {
- "comment": "Thanks ${issueAuthor} for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌"
- }
- },
- {
- "name": "requestReviewer",
- "parameters": {
- "reviewer": "michael-hawker"
- }
- },
- {
- "name": "requestReviewer",
- "parameters": {
- "reviewer": "azchohfi"
- }
- },
- {
- "name": "requestReviewer",
- "parameters": {
- "reviewer": "Kyaa-dost"
- }
- },
- {
- "name": "requestReviewer",
- "parameters": {
- "reviewer": "RosarioPulella"
- }
- }
- ]
- }
- },
- {
- "taskType": "trigger",
- "capabilityId": "InPrLabel",
- "subCapability": "InPrLabel",
- "version": "1.0",
- "id": "xlu4qgLuj",
- "config": {
- "label_inPr": "In-PR :rocket:",
- "fixedLabelEnabled": true,
- "label_fixed": "Completed :fire:",
- "taskName": "Issues labeled as \"In-PR\" and \"Fixed\" when the merge is in-progress and completes "
- }
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "PullRequestReviewResponder",
- "version": "1.0",
- "config": {
- "taskName": "Add \"needs author feedback\" label to pull requests when changes are requested",
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "name": "isAction",
- "parameters": {
- "action": "submitted"
- }
- },
- {
- "name": "isReviewState",
- "parameters": {
- "state": "changes_requested"
- }
- }
- ]
- },
- "actions": [
- {
- "name": "addLabel",
- "parameters": {
- "label": "needs author feedback :memo:"
- }
- }
- ],
- "eventType": "pull_request",
- "eventNames": [
- "pull_request_review"
- ]
- },
- "id": "FYIoG0Npxh"
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "PullRequestResponder",
- "version": "1.0",
- "config": {
- "taskName": "Remove needs author feedback label when the author responds to a pull request",
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "name": "isActivitySender",
- "parameters": {
- "user": {
- "type": "author"
- }
- }
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "isAction",
- "parameters": {
- "action": "closed"
- }
- }
- ]
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "needs author feedback :memo:"
- }
- }
- ]
- },
- "actions": [
- {
- "name": "removeLabel",
- "parameters": {
- "label": "needs author feedback :memo:"
- }
- },
- {
- "name": "addLabel",
- "parameters": {
- "groupId": "5dd873e390bf2e113c0e8866",
- "skipOpener": true,
- "label": "needs attention :wave:"
- }
- },
- {
- "name": "addReply",
- "parameters": {
- "comment": "This PR has been marked as \"needs attention 👋\" and awaiting a response from the team. "
- }
- }
- ],
- "eventType": "pull_request",
- "eventNames": [
- "pull_request",
- "issues",
- "project_card"
- ]
- },
- "id": "oW7hAFZ8gs"
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "PullRequestResponder",
- "version": "1.0",
- "config": {
- "taskName": "Remove no recent activity label from pull requests",
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "operator": "not",
- "operands": [
- {
- "name": "isAction",
- "parameters": {
- "action": "closed"
- }
- }
- ]
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "no-recent-activity :chart_with_downwards_trend:"
- }
- }
- ]
- },
- "actions": [
- {
- "name": "removeLabel",
- "parameters": {
- "label": "no-recent-activity :chart_with_downwards_trend:"
- }
- }
- ],
- "eventType": "pull_request",
- "eventNames": [
- "pull_request",
- "issues",
- "project_card"
- ]
- },
- "id": "-uRU3429nG"
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "PullRequestCommentResponder",
- "version": "1.0",
- "config": {
- "taskName": "Remove no recent activity label when a pull request is commented on",
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "no-recent-activity :chart_with_downwards_trend:"
- }
- }
- ]
- },
- "actions": [
- {
- "name": "removeLabel",
- "parameters": {
- "label": "no-recent-activity :chart_with_downwards_trend:"
- }
- }
- ],
- "eventType": "pull_request",
- "eventNames": [
- "issue_comment"
- ]
- },
- "id": "sM14ilohf5"
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "PullRequestReviewResponder",
- "version": "1.0",
- "config": {
- "taskName": "Remove no recent activity label when a pull request is reviewed",
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "no-recent-activity :chart_with_downwards_trend:"
- }
- }
- ]
- },
- "actions": [
- {
- "name": "removeLabel",
- "parameters": {
- "label": "no-recent-activity :chart_with_downwards_trend:"
- }
- }
- ],
- "eventType": "pull_request",
- "eventNames": [
- "pull_request_review"
- ]
- },
- "id": "DfEiarIuNP"
- },
- {
- "taskType": "scheduled",
- "capabilityId": "ScheduledSearch",
- "subCapability": "ScheduledSearch",
- "version": "1.1",
- "config": {
- "taskName": "Close Stale pull requests",
- "frequency": [
- {
- "weekDay": 0,
- "hours": [
- 0,
- 3,
- 6,
- 9,
- 12,
- 15,
- 18,
- 21
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 1,
- "hours": [
- 0,
- 3,
- 6,
- 9,
- 12,
- 15,
- 18,
- 21
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 2,
- "hours": [
- 0,
- 3,
- 6,
- 9,
- 12,
- 15,
- 18,
- 21
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 3,
- "hours": [
- 0,
- 3,
- 6,
- 9,
- 12,
- 15,
- 18,
- 21
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 4,
- "hours": [
- 0,
- 3,
- 6,
- 9,
- 12,
- 15,
- 18,
- 21
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 5,
- "hours": [
- 0,
- 3,
- 6,
- 9,
- 12,
- 15,
- 18,
- 21
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 6,
- "hours": [
- 0,
- 3,
- 6,
- 9,
- 12,
- 15,
- 18,
- 21
- ],
- "timezoneOffset": -8
- }
- ],
- "searchTerms": [
- {
- "name": "isPr",
- "parameters": {}
- },
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "needs author feedback :memo:"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "no-recent-activity :chart_with_downwards_trend:"
- }
- },
- {
- "name": "noActivitySince",
- "parameters": {
- "days": 45
- }
- }
- ],
- "actions": [
- {
- "name": "closeIssue",
- "parameters": {}
- }
- ]
- },
- "id": "v7Xw5uy5r2"
- },
- {
- "taskType": "scheduled",
- "capabilityId": "ScheduledSearch",
- "subCapability": "ScheduledSearch",
- "version": "1.1",
- "config": {
- "taskName": "Add no recent activity label to pull requests",
- "frequency": [
- {
- "weekDay": 0,
- "hours": [
- 1,
- 4,
- 7,
- 10,
- 13,
- 16,
- 19,
- 22
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 1,
- "hours": [
- 1,
- 4,
- 7,
- 10,
- 13,
- 16,
- 19,
- 22
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 2,
- "hours": [
- 1,
- 4,
- 7,
- 10,
- 13,
- 16,
- 19,
- 22
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 3,
- "hours": [
- 1,
- 4,
- 7,
- 10,
- 13,
- 16,
- 19,
- 22
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 4,
- "hours": [
- 1,
- 4,
- 7,
- 10,
- 13,
- 16,
- 19,
- 22
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 5,
- "hours": [
- 1,
- 4,
- 7,
- 10,
- 13,
- 16,
- 19,
- 22
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 6,
- "hours": [
- 1,
- 4,
- 7,
- 10,
- 13,
- 16,
- 19,
- 22
- ],
- "timezoneOffset": -8
- }
- ],
- "searchTerms": [
- {
- "name": "isPr",
- "parameters": {}
- },
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "needs author feedback :memo:"
- }
- },
- {
- "name": "noActivitySince",
- "parameters": {
- "days": 15
- }
- },
- {
- "name": "noLabel",
- "parameters": {
- "label": "no-recent-activity :chart_with_downwards_trend:"
- }
- }
- ],
- "actions": [
- {
- "name": "addLabel",
- "parameters": {
- "label": "no-recent-activity :chart_with_downwards_trend:"
- }
- },
- {
- "name": "addReply",
- "parameters": {
- "comment": "This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **15 days**. It will be closed if no further activity occurs **within 30 days of this comment**."
- }
- }
- ]
- },
- "id": "m0PTbzkc0_"
- },
- {
- "taskType": "trigger",
- "capabilityId": "AutoMerge",
- "subCapability": "AutoMerge",
- "version": "1.0",
- "config": {
- "taskName": "Automatically merge pull requests",
- "label": "auto merge :zap:",
- "silentMode": false,
- "minMinutesOpen": "480",
- "mergeType": "merge",
- "allowAutoMergeInstructionsWithoutLabel": false,
- "deleteBranches": true,
- "enforceDMPAsStatus": true,
- "requireAllStatuses": false,
- "requireAllStatuses_exemptList": [],
- "removeLabelOnPush": true,
- "conditionalMergeTypes": [],
- "requireSpecificCheckRuns": false,
- "usePrDescriptionAsCommitMessage": true,
- "requireSpecificCheckRunsList": [
- "Toolkit-CI",
- "WIP",
- "license/cla"
- ]
- },
- "id": "NWRMh_TRrV",
- "disabled": false
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "IssueCommentResponder",
- "version": "1.0",
- "config": {
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "operator": "not",
- "operands": [
- {
- "name": "isOpen",
- "parameters": {}
- }
- ]
- },
- {
- "name": "isAction",
- "parameters": {
- "action": "created"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "no-recent-activity :chart_with_downwards_trend:"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "needs author feedback :memo:"
- }
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "noActivitySince",
- "parameters": {
- "days": 7
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "isCloseAndComment",
- "parameters": {}
- }
- ]
- },
- {
- "name": "isActivitySender",
- "parameters": {
- "user": {
- "type": "author"
- }
- }
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "activitySenderHasPermissions",
- "parameters": {
- "permissions": "none"
- }
- }
- ]
- }
- ]
- },
- "eventType": "issue",
- "eventNames": [
- "issue_comment"
- ],
- "taskName": "For issues closed due to inactivity, re-open an issue if issue author posts a reply within 7 days.",
- "actions": [
- {
- "name": "reopenIssue",
- "parameters": {}
- },
- {
- "name": "removeLabel",
- "parameters": {
- "label": "no-recent-activity :chart_with_downwards_trend:"
- }
- },
- {
- "name": "removeLabel",
- "parameters": {
- "label": "needs author feedback :memo:"
- }
- },
- {
- "name": "addLabel",
- "parameters": {
- "label": "needs attention :wave:"
- }
- }
- ]
- },
- "id": "_q3fIc02A"
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "IssueCommentResponder",
- "version": "1.0",
- "config": {
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "name": "isAction",
- "parameters": {
- "action": "created"
- }
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "isOpen",
- "parameters": {}
- }
- ]
- },
- {
- "name": "activitySenderHasPermissions",
- "parameters": {
- "permissions": "none"
- }
- },
- {
- "name": "noActivitySince",
- "parameters": {
- "days": 7
- }
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "isCloseAndComment",
- "parameters": {}
- }
- ]
- }
- ]
- },
- "eventType": "issue",
- "eventNames": [
- "issue_comment"
- ],
- "taskName": "For issues closed with no activity over 7 days, ask non-contributor to consider opening a new issue instead.",
- "actions": [
- {
- "name": "addReply",
- "parameters": {
- "comment": "Hello lovely human, thank you for your comment on this issue. Because this issue has been closed for a period of time, please strongly consider opening a new issue linking to this issue instead to ensure better visibility of your comment. Thank you!"
- }
- }
- ]
- },
- "id": "-ChxjXKlVc"
- },
- {
- "taskType": "scheduled",
- "capabilityId": "ScheduledSearch",
- "subCapability": "ScheduledSearch",
- "version": "1.1",
- "config": {
- "frequency": [
- {
- "weekDay": 0,
- "hours": [
- 1,
- 4,
- 7,
- 10,
- 13,
- 16,
- 19,
- 22
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 1,
- "hours": [
- 1,
- 4,
- 7,
- 10,
- 13,
- 16,
- 19,
- 22
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 2,
- "hours": [
- 1,
- 4,
- 7,
- 10,
- 13,
- 16,
- 19,
- 22
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 3,
- "hours": [
- 1,
- 4,
- 7,
- 10,
- 13,
- 16,
- 19,
- 22
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 4,
- "hours": [
- 1,
- 4,
- 7,
- 10,
- 13,
- 16,
- 19,
- 22
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 5,
- "hours": [
- 1,
- 4,
- 7,
- 10,
- 13,
- 16,
- 19,
- 22
- ],
- "timezoneOffset": -8
- },
- {
- "weekDay": 6,
- "hours": [
- 1,
- 4,
- 7,
- 10,
- 13,
- 16,
- 19,
- 22
- ],
- "timezoneOffset": -8
- }
- ],
- "searchTerms": [
- {
- "name": "isClosed",
- "parameters": {}
- },
- {
- "name": "noActivitySince",
- "parameters": {
- "days": 60
- }
- },
- {
- "name": "isUnlocked",
- "parameters": {}
- },
- {
- "name": "isIssue",
- "parameters": {}
- }
- ],
- "taskName": "Lock issues closed without activity for over 60 days",
- "actions": [
- {
- "name": "lockIssue",
- "parameters": {
- "reason": "resolved"
- }
- }
- ]
- },
- "id": "wWxYItL3hl"
- },
- {
- "taskType": "trigger",
- "capabilityId": "EmailCleanser",
- "subCapability": "EmailCleanser",
- "version": "1.0",
- "id": "vlRSU7Suz",
- "config": {
- "taskName": "Remove Quoted Email Content "
- }
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "IssuesOnlyResponder",
- "version": "1.0",
- "id": "NEOXUiMV8",
- "config": {
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "needs triage :mag:"
- }
- },
- {
- "name": "labelAdded",
- "parameters": {
- "label": "In-PR :rocket:"
- }
- },
- {
- "name": "isPartOfProject",
- "parameters": {}
- },
- {
- "operator": "or",
- "operands": [
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "needs triage :mag:"
- }
- },
- {
- "name": "isAssignedToSomeone",
- "parameters": {}
- },
- {
- "name": "isPartOfProject",
- "parameters": {}
- }
- ]
- }
- ]
- },
- "eventType": "issue",
- "eventNames": [
- "issues",
- "project_card"
- ],
- "taskName": "Remove needs triage label",
- "actions": [
- {
- "name": "removeLabel",
- "parameters": {
- "label": "needs triage :mag:"
- }
- }
- ]
- }
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "IssuesOnlyResponder",
- "version": "1.0",
- "id": "-1mJNNyj7",
- "config": {
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "name": "isAction",
- "parameters": {
- "action": "opened"
- }
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "isPartOfProject",
- "parameters": {}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "isAssignedToSomeone",
- "parameters": {}
- }
- ]
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "question :grey_question:"
- }
- }
- ]
- },
- "eventType": "issue",
- "eventNames": [
- "issues",
- "project_card"
- ],
- "taskName": "Add Question Label ",
- "actions": [
- {
- "name": "addLabel",
- "parameters": {
- "label": "needs triage :mag:"
- }
- },
- {
- "name": "addReply",
- "parameters": {
- "comment": "Hello ${issueAuthor}, thank you for your interest in Windows Community Toolkit!\n\nI have automatically added a \"needs triage\" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible.. Other community members may also answer the question and provide feedback 🙌"
- }
- }
- ]
- }
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "IssuesOnlyResponder",
- "version": "1.0",
- "id": "DCNi3QnmT",
- "config": {
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "name": "isAction",
- "parameters": {
- "action": "opened"
- }
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "isPartOfProject",
- "parameters": {}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "isAssignedToSomeone",
- "parameters": {}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "isLabeled",
- "parameters": {}
- }
- ]
- }
- ]
- },
- "eventType": "issue",
- "eventNames": [
- "issues",
- "project_card"
- ],
- "taskName": "Add \"needs triage\" label to empty template",
- "actions": [
- {
- "name": "addLabel",
- "parameters": {
- "label": "needs triage :mag:"
- }
- },
- {
- "name": "addReply",
- "parameters": {
- "comment": "Hello ${issueAuthor}, thank you for opening an issue with us! \n\nI have automatically added a \"needs triage\" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌"
- }
- }
- ]
- }
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "IssuesOnlyResponder",
- "version": "1.0",
- "id": "2oQJkyLzq",
- "config": {
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "or",
- "operands": [
- {
- "name": "addedToProjectColumn",
- "parameters": {
- "label": "for-review :book:",
- "projectName": "Bugs 7.1",
- "columnName": "In progress"
- }
- },
- {
- "name": "addedToProjectColumn",
- "parameters": {
- "projectName": "Technical 7.1",
- "columnName": "In progress"
- }
- },
- {
- "name": "addedToProjectColumn",
- "parameters": {
- "projectName": "Features 7.1",
- "columnName": "In progress"
- }
- },
- {
- "name": "addedToProjectColumn",
- "parameters": {
- "projectName": "Samples 7.1",
- "columnName": "In progress"
- }
- }
- ]
- }
- ]
- },
- "eventType": "issue",
- "eventNames": [
- "issues",
- "project_card"
- ],
- "taskName": "Add \"In progress\" label when moved to In progress column in the project",
- "actions": [
- {
- "name": "removeLabel",
- "parameters": {
- "label": "Completed :fire:"
- }
- },
- {
- "name": "removeLabel",
- "parameters": {
- "label": "needs triage :mag:"
- }
- },
- {
- "name": "addLabel",
- "parameters": {
- "label": "in progress :construction:"
- }
- }
- ]
- }
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "IssuesOnlyResponder",
- "version": "1.0",
- "id": "dhIp1pFim",
- "config": {
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "or",
- "operands": [
- {
- "name": "addedToProjectColumn",
- "parameters": {
- "projectName": "Bugs 7.1",
- "columnName": "Done"
- }
- },
- {
- "name": "addedToProjectColumn",
- "parameters": {
- "projectName": "Technical 7.1",
- "columnName": "Done"
- }
- },
- {
- "name": "addedToProjectColumn",
- "parameters": {
- "projectName": "Features 7.1",
- "columnName": "Done"
- }
- },
- {
- "name": "addedToProjectColumn",
- "parameters": {
- "projectName": "Samples 7.1",
- "columnName": "Done"
- }
- }
- ]
- }
- ]
- },
- "eventType": "issue",
- "eventNames": [
- "issues",
- "project_card"
- ],
- "taskName": "Add \"Completed\" label when moved to Done column in the project",
- "actions": [
- {
- "name": "removeLabel",
- "parameters": {
- "label": "in progress :construction:"
- }
- },
- {
- "name": "removeLabel",
- "parameters": {
- "label": "needs triage :mag:"
- }
- },
- {
- "name": "addLabel",
- "parameters": {
- "label": "Completed :fire:"
- }
- }
- ]
- }
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "IssuesOnlyResponder",
- "version": "1.0",
- "id": "xB212GPFx",
- "config": {
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "or",
- "operands": [
- {
- "name": "addedToProjectColumn",
- "parameters": {
- "projectName": "Bugs 7.1",
- "columnName": "To do"
- }
- },
- {
- "name": "addedToProjectColumn",
- "parameters": {
- "projectName": "Technical 7.1",
- "columnName": "To do"
- }
- },
- {
- "name": "addedToProjectColumn",
- "parameters": {
- "projectName": "Features 7.1",
- "columnName": "To do"
- }
- },
- {
- "name": "addedToProjectColumn",
- "parameters": {
- "projectName": "Samples 7.1",
- "columnName": "To do"
- }
- }
- ]
- }
- ]
- },
- "eventType": "issue",
- "eventNames": [
- "issues",
- "project_card"
- ],
- "taskName": "Remove labels when moved to 'To do' column in the project",
- "actions": [
- {
- "name": "removeLabel",
- "parameters": {
- "label": "in progress :construction:"
- }
- },
- {
- "name": "removeLabel",
- "parameters": {
- "label": "Completed :fire:"
- }
- }
- ]
- }
- },
- {
- "taskType": "scheduled",
- "capabilityId": "ScheduledSearch",
- "subCapability": "ScheduledSearch",
- "version": "1.1",
- "id": "1TuSEcCua",
- "config": {
- "frequency": [
- {
- "weekDay": 0,
- "hours": [
- 13,
- 14,
- 15,
- 16,
- 17
- ],
- "timezoneOffset": -7
- },
- {
- "weekDay": 1,
- "hours": [
- 13,
- 14,
- 15,
- 16,
- 17
- ],
- "timezoneOffset": -7
- },
- {
- "weekDay": 2,
- "hours": [
- 13,
- 14,
- 15,
- 16,
- 17
- ],
- "timezoneOffset": -7
- },
- {
- "weekDay": 3,
- "hours": [
- 13,
- 14,
- 15,
- 16,
- 17
- ],
- "timezoneOffset": -7
- },
- {
- "weekDay": 4,
- "hours": [
- 13,
- 14,
- 15,
- 16,
- 17
- ],
- "timezoneOffset": -7
- },
- {
- "weekDay": 5,
- "hours": [
- 13,
- 14,
- 15,
- 16,
- 17
- ],
- "timezoneOffset": -7
- },
- {
- "weekDay": 6,
- "hours": [
- 13,
- 14,
- 15,
- 16,
- 17
- ],
- "timezoneOffset": -7
- }
- ],
- "searchTerms": [
- {
- "name": "isIssue",
- "parameters": {}
- },
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "by design :art:"
- }
- },
- {
- "name": "created",
- "parameters": {
- "operator": "<",
- "days": 1
- }
- }
- ],
- "taskName": "Test",
- "actions": [
- {
- "name": "addReply",
- "parameters": {
- "comment": "Test purposes only"
- }
- }
- ]
- },
- "disabled": true
- },
- {
- "taskType": "trigger",
- "capabilityId": "ReleaseAnnouncement",
- "subCapability": "ReleaseAnnouncement",
- "version": "1.0",
- "id": "uFM0vTFhb",
- "config": {
- "taskName": "Announce a release regarding fix",
- "prReply": ":tada::tada:`${pkgName} ${version}` has been released which incorporates this pull request:tada::tada:\n\n\n* [Release Notes](https://github.com/${owner}/${repo}/releases/tag/${version})\n",
- "issueReply": ":tada::tada:This issue was addressed in #${prNumber}, which has been released as `${pkgName} ${version}`:tada::tada:\n\n* [Release Notes](https://github.com/${owner}/${repo}/releases/tag/${version})\n",
- "referencedPrsRegex": "\\#([0-9]+)\\s*\\)",
- "conditionalPrReplies": [],
- "packageRegex": "(v.*)",
- "packageVersionGroup": 1
- },
- "disabled": false
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "IssuesOnlyResponder",
- "version": "1.0",
- "id": "rk_usYpO0",
- "config": {
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "operator": "or",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "bug :bug:"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "question :grey_question:"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "feature request :mailbox_with_mail:"
- }
- }
- ]
- },
- {
- "operator": "or",
- "operands": [
- {
- "name": "isActivitySender",
- "parameters": {
- "user": "Kyaa-dost"
- }
- },
- {
- "name": "isActivitySender",
- "parameters": {
- "user": "michael-hawker"
- }
- },
- {
- "name": "isActivitySender",
- "parameters": {
- "user": "azchohfi"
- }
- },
- {
- "name": "isActivitySender",
- "parameters": {
- "user": "RosarioPulella"
- }
- }
- ]
- },
- {
- "operator": "and",
- "operands": [
- {
- "name": "isAction",
- "parameters": {
- "action": "reopened"
- }
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "isPartOfProject",
- "parameters": {}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "isAssignedToSomeone",
- "parameters": {}
- }
- ]
- }
- ]
- }
- ]
- },
- "eventType": "issue",
- "eventNames": [
- "issues",
- "project_card"
- ],
- "taskName": "Add Need Triage label when opening issue by certain activity sender",
- "actions": [
- {
- "name": "addLabel",
- "parameters": {
- "label": "help wanted :raising_hand:"
- }
- }
- ]
- },
- "disabled": true
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "PullRequestCommentResponder",
- "version": "1.0",
- "id": "IsGnVmgLb",
- "config": {
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "name": "isAction",
- "parameters": {
- "action": "created"
- }
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "isActivitySender",
- "parameters": {
- "user": {
- "type": "author"
- }
- }
- }
- ]
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "needs attention :wave:"
- }
- },
- {
- "name": "isOpen",
- "parameters": {}
- }
- ]
- },
- "eventType": "pull_request",
- "eventNames": [
- "issue_comment"
- ],
- "actions": [
- {
- "name": "removeLabel",
- "parameters": {
- "label": "needs attention :wave:"
- }
- }
- ],
- "taskName": "Remove Needs Attention label"
- }
- },
- {
- "taskType": "scheduled",
- "capabilityId": "ScheduledSearch",
- "subCapability": "ScheduledSearch",
- "version": "1.1",
- "id": "jc1ups-1u",
- "config": {
- "frequency": [
- {
- "weekDay": 0,
- "hours": [
- 0,
- 3,
- 6,
- 9,
- 12,
- 15,
- 18,
- 21
- ],
- "timezoneOffset": -7
- },
- {
- "weekDay": 1,
- "hours": [
- 0,
- 3,
- 6,
- 9,
- 12,
- 15,
- 18,
- 21
- ],
- "timezoneOffset": -7
- },
- {
- "weekDay": 2,
- "hours": [
- 0,
- 3,
- 6,
- 9,
- 12,
- 15,
- 18,
- 21
- ],
- "timezoneOffset": -7
- },
- {
- "weekDay": 3,
- "hours": [
- 0,
- 3,
- 6,
- 9,
- 12,
- 15,
- 18,
- 21
- ],
- "timezoneOffset": -7
- },
- {
- "weekDay": 4,
- "hours": [
- 0,
- 3,
- 6,
- 9,
- 12,
- 15,
- 18,
- 21
- ],
- "timezoneOffset": -7
- },
- {
- "weekDay": 5,
- "hours": [
- 0,
- 3,
- 6,
- 9,
- 12,
- 15,
- 18,
- 21
- ],
- "timezoneOffset": -7
- },
- {
- "weekDay": 6,
- "hours": [
- 0,
- 3,
- 6,
- 9,
- 12,
- 15,
- 18,
- 21
- ],
- "timezoneOffset": -7
- }
- ],
- "searchTerms": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "not an issue :x:"
- }
- },
- {
- "name": "isIssue",
- "parameters": {}
- },
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "name": "noActivitySince",
- "parameters": {
- "days": 1
- }
- }
- ],
- "taskName": "Close \"Not an issue\" issues",
- "actions": [
- {
- "name": "addReply",
- "parameters": {
- "comment": "This issue has been marked as being beyond the support scope of Windows Community Toolkit. It will now be closed automatically for house-keeping purposes. "
- }
- },
- {
- "name": "closeIssue",
- "parameters": {}
- }
- ]
- }
- },
- {
- "taskType": "scheduled",
- "capabilityId": "ScheduledSearch",
- "subCapability": "ScheduledSearch",
- "version": "1.1",
- "id": "z8n6cOfx_",
- "config": {
- "frequency": [
- {
- "weekDay": 0,
- "hours": [
- 2,
- 5,
- 8,
- 11,
- 14,
- 17,
- 20,
- 23
- ],
- "timezoneOffset": -7
- },
- {
- "weekDay": 1,
- "hours": [
- 2,
- 5,
- 8,
- 11,
- 14,
- 17,
- 20,
- 23
- ],
- "timezoneOffset": -7
- },
- {
- "weekDay": 2,
- "hours": [
- 2,
- 5,
- 8,
- 11,
- 14,
- 17,
- 20,
- 23
- ],
- "timezoneOffset": -7
- },
- {
- "weekDay": 3,
- "hours": [
- 2,
- 5,
- 8,
- 11,
- 14,
- 17,
- 20,
- 23
- ],
- "timezoneOffset": -7
- },
- {
- "weekDay": 4,
- "hours": [
- 2,
- 5,
- 8,
- 11,
- 14,
- 17,
- 20,
- 23
- ],
- "timezoneOffset": -7
- },
- {
- "weekDay": 5,
- "hours": [
- 2,
- 5,
- 8,
- 11,
- 14,
- 17,
- 20,
- 23
- ],
- "timezoneOffset": -7
- },
- {
- "weekDay": 6,
- "hours": [
- 2,
- 5,
- 8,
- 11,
- 14,
- 17,
- 20,
- 23
- ],
- "timezoneOffset": -7
- }
- ],
- "searchTerms": [
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "name": "isIssue",
- "parameters": {}
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "wontfix :x:"
- }
- },
- {
- "name": "noActivitySince",
- "parameters": {
- "days": 3
- }
- }
- ],
- "taskName": "Close issues that marked as won't fix",
- "actions": [
- {
- "name": "closeIssue",
- "parameters": {}
- }
- ]
- }
- },
- {
- "taskType": "trigger",
- "capabilityId": "LabelSync",
- "subCapability": "LabelSync",
- "version": "1.0",
- "id": "zCjqQfQz-",
- "config": {
- "taskName": "Sync Issues Label to PR's",
- "labelPatterns": [
- {
- "pattern": "bug"
- },
- {
- "pattern": "bulb"
- },
- {
- "pattern": "document"
- },
- {
- "pattern": "sample"
- },
- {
- "pattern": "improvements "
- },
- {
- "pattern": "DataGrid"
- },
- {
- "pattern": "accessibility "
- },
- {
- "pattern": "breaking change"
- },
- {
- "pattern": "controls"
- },
- {
- "pattern": "markdown"
- },
- {
- "pattern": "parsers"
- },
- {
- "pattern": "extensions"
- },
- {
- "pattern": "nuget"
- },
- {
- "pattern": "UI"
- },
- {
- "pattern": "hacktoberfest"
- },
- {
- "pattern": "fix"
- },
- {
- "pattern": "priority"
- },
- {
- "pattern": "feature"
- }
- ]
- }
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "IssuesOnlyResponder",
- "version": "1.0",
- "id": "pkn6z17_K",
- "config": {
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "In-PR :rocket:"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "help wanted :raising_hand:"
- }
- },
- {
- "name": "isLabeled",
- "parameters": {}
- }
- ]
- },
- "eventType": "issue",
- "eventNames": [
- "issues",
- "project_card"
- ],
- "taskName": "Remove Help Wanted label from issues if the PR is created",
- "actions": [
- {
- "name": "removeLabel",
- "parameters": {
- "label": "help wanted :raising_hand:"
- }
- }
- ]
- }
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "IssuesOnlyResponder",
- "version": "1.0",
- "id": "QAtzSTPDd",
- "config": {
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "In-PR :rocket:"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "needs triage :mag:"
- }
- },
- {
- "name": "isLabeled",
- "parameters": {}
- }
- ]
- },
- "eventType": "issue",
- "eventNames": [
- "issues",
- "project_card"
- ],
- "taskName": "Remove Need Triage label from issues if the PR is created",
- "actions": [
- {
- "name": "removeLabel",
- "parameters": {
- "label": "needs triage :mag:"
- }
- }
- ]
- }
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "PullRequestResponder",
- "version": "1.0",
- "id": "dHVPYmZZR",
- "config": {
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "name": "isAction",
- "parameters": {
- "action": "opened"
- }
- },
- {
- "name": "activitySenderHasAssociation",
- "parameters": {
- "association": "FIRST_TIME_CONTRIBUTOR"
- }
- }
- ]
- },
- "eventType": "pull_request",
- "eventNames": [
- "pull_request",
- "issues",
- "project_card"
- ],
- "actions": [
- {
- "name": "addLabel",
- "parameters": {
- "label": "First Time Contributor :wave:"
- }
- },
- {
- "name": "addReactionToIssue",
- "parameters": {
- "reaction": "heart"
- }
- },
- {
- "name": "addReactionToIssue",
- "parameters": {
- "reaction": "hooray"
- }
- },
- {
- "name": "addReply",
- "parameters": {
- "comment": "${issueAuthor} Welcome to the Windows Community Toolkit 💙💙💙\n\nWe always love to see new contributors joining the community and taking initiatives to contribute and add value to the toolkit 🙌\n\nIf you haven't had a chance to explore our [Contribution Wiki page](https://github.com/windows-toolkit/WindowsCommunityToolkit/wiki) then please feel free to do as it will help you transition smoothly.\n\nOnce again Thank you so much for the contribution and we are certainly looking forward to working with you more in the future 🚀🚀"
- }
- }
- ],
- "taskName": "Welcome message to the first time Github Committer when opening a new PR"
- }
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "IssuesOnlyResponder",
- "version": "1.0",
- "id": "E8apbGccM",
- "config": {
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "or",
- "operands": [
- {
- "name": "addedToProjectColumn",
- "parameters": {
- "projectName": "Bugs 7.1",
- "columnName": ""
- }
- },
- {
- "name": "addedToProjectColumn",
- "parameters": {
- "projectName": "Features 7.1"
- }
- },
- {
- "name": "addedToProjectColumn",
- "parameters": {
- "projectName": "Technical 7.1"
- }
- },
- {
- "name": "addedToProjectColumn",
- "parameters": {
- "projectName": "Samples 7.1"
- }
- }
- ]
- }
- ]
- },
- "eventType": "issue",
- "eventNames": [
- "issues",
- "project_card"
- ],
- "actions": [
- {
- "name": "addMilestone",
- "parameters": {
- "milestoneName": "7.1"
- }
- }
- ],
- "taskName": "Add milestone if the issue is added in the project column (7.1)"
- }
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "IssuesOnlyResponder",
- "version": "1.0",
- "id": "fWjQeVQ87",
- "config": {
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "or",
- "operands": [
- {
- "name": "removedFromProjectColumn",
- "parameters": {
- "projectName": "Samples 7.1"
- }
- },
- {
- "name": "removedFromProjectColumn",
- "parameters": {
- "projectName": "Features 7.1"
- }
- },
- {
- "name": "removedFromProjectColumn",
- "parameters": {
- "projectName": "Technical 7.1"
- }
- },
- {
- "name": "removedFromProjectColumn",
- "parameters": {
- "milestoneName": "Technical 7.1",
- "projectName": "Technical 7.1"
- }
- }
- ]
- }
- ]
- },
- "eventType": "issue",
- "eventNames": [
- "issues",
- "project_card"
- ],
- "actions": [
- {
- "name": "removeMilestone",
- "parameters": {}
- }
- ],
- "taskName": "Remove milestone if the issue is removed from the project column"
- },
- "disabled": false
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "PullRequestResponder",
- "version": "1.0",
- "id": "zyAjzhCuL",
- "config": {
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "or",
- "operands": [
- {
- "name": "addedToProjectColumn",
- "parameters": {
- "projectName": "Bugs 7.1"
- }
- },
- {
- "name": "addedToProjectColumn",
- "parameters": {
- "projectName": "Features 7.1"
- }
- },
- {
- "name": "addedToProjectColumn",
- "parameters": {
- "projectName": "Technical 7.1"
- }
- },
- {
- "name": "addedToProjectColumn",
- "parameters": {
- "projectName": "Samples 7.1"
- }
- }
- ]
- }
- ]
- },
- "eventType": "pull_request",
- "eventNames": [
- "pull_request",
- "issues",
- "project_card"
- ],
- "actions": [
- {
- "name": "addMilestone",
- "parameters": {
- "milestoneName": "7.1"
- }
- }
- ],
- "taskName": "Add milestone if the PR is added in the project column (7.1)"
- },
- "disabled": false
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "PullRequestResponder",
- "version": "1.0",
- "id": "z5rYJXIDt",
- "config": {
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "or",
- "operands": [
- {
- "name": "removedFromProjectColumn",
- "parameters": {
- "projectName": "Samples 7.1"
- }
- },
- {
- "name": "removedFromProjectColumn",
- "parameters": {
- "projectName": "Features 7.1"
- }
- },
- {
- "name": "removedFromProjectColumn",
- "parameters": {
- "projectName": "Features 7.1"
- }
- },
- {
- "name": "removedFromProjectColumn",
- "parameters": {
- "projectName": "Technical 7.1"
- }
- }
- ]
- }
- ]
- },
- "eventType": "pull_request",
- "eventNames": [
- "pull_request",
- "issues",
- "project_card"
- ],
- "taskName": "Remove milestone if the PR is removed from the project column",
- "actions": [
- {
- "name": "removeMilestone",
- "parameters": {}
- }
- ]
- },
- "disabled": false
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "IssuesOnlyResponder",
- "version": "1.0",
- "id": "-NV3BbbFn",
- "config": {
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "name": "labelAdded",
- "parameters": {
- "label": "In-PR :rocket:"
- }
- },
- {
- "name": "isInProjectColumn",
- "parameters": {
- "projectName": "Bugs 7.1",
- "columnName": "To do"
- }
- }
- ]
- },
- "eventType": "issue",
- "eventNames": [
- "issues",
- "project_card"
- ],
- "actions": [
- {
- "name": "moveToProjectColumn",
- "parameters": {
- "projectName": "Bugs 7.1",
- "columnName": "In progress"
- }
- },
- {
- "name": "addLabel",
- "parameters": {
- "label": "in progress :construction:"
- }
- }
- ],
- "taskName": "Move to In-progress column in the project once In-PR label applied"
- }
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "IssuesOnlyResponder",
- "version": "1.0",
- "id": "-wiOMu4Ut",
- "config": {
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "name": "labelAdded",
- "parameters": {
- "label": "In-PR :rocket:"
- }
- },
- {
- "name": "isInProjectColumn",
- "parameters": {
- "projectName": "Features 7.1",
- "columnName": "To do"
- }
- }
- ]
- },
- "eventType": "issue",
- "eventNames": [
- "issues",
- "project_card"
- ],
- "taskName": "Move to In-progress column in the project once In-PR label applied",
- "actions": [
- {
- "name": "moveToProjectColumn",
- "parameters": {
- "projectName": "Features 7.1",
- "columnName": "In progress"
- }
- },
- {
- "name": "addLabel",
- "parameters": {
- "label": "in progress :construction:"
- }
- }
- ]
- }
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "IssuesOnlyResponder",
- "version": "1.0",
- "id": "rgqvFjC3u",
- "config": {
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "name": "labelAdded",
- "parameters": {
- "label": "In-PR :rocket:"
- }
- },
- {
- "name": "isInProjectColumn",
- "parameters": {
- "projectName": "Technical 7.1",
- "columnName": "To do"
- }
- }
- ]
- },
- "eventType": "issue",
- "eventNames": [
- "issues",
- "project_card"
- ],
- "taskName": "Move to In-progress column in the project once In-PR label applied",
- "actions": [
- {
- "name": "moveToProjectColumn",
- "parameters": {
- "projectName": "Technical 7.1",
- "columnName": "In progress"
- }
- },
- {
- "name": "addLabel",
- "parameters": {
- "label": "in progress :construction:"
- }
- }
- ]
- }
- },
- {
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "IssuesOnlyResponder",
- "version": "1.0",
- "id": "P2PuVQ-EO",
- "config": {
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "name": "labelAdded",
- "parameters": {
- "label": "In-PR :rocket:"
- }
- },
- {
- "name": "isInProjectColumn",
- "parameters": {
- "projectName": "Samples 7.1",
- "columnName": "To do"
- }
- }
- ]
- },
- "eventType": "issue",
- "eventNames": [
- "issues",
- "project_card"
- ],
- "taskName": "Move to In-progress column in the project once In-PR label applied",
- "actions": [
- {
- "name": "moveToProjectColumn",
- "parameters": {
- "projectName": "Samples 7.1",
- "columnName": "In progress"
- }
- },
- {
- "name": "addLabel",
- "parameters": {
- "label": "in progress :construction:"
- }
- }
- ]
- }
- },
- {
- "taskType": "scheduled",
- "capabilityId": "ScheduledSearch",
- "subCapability": "ScheduledSearch",
- "version": "1.1",
- "id": "Zznnk72Pm",
- "config": {
- "frequency": [
- {
- "weekDay": 0,
- "hours": [
- 5,
- 11,
- 17,
- 23
- ],
- "timezoneOffset": -7
- },
- {
- "weekDay": 1,
- "hours": [
- 5,
- 11,
- 17,
- 23
- ],
- "timezoneOffset": -7
- },
- {
- "weekDay": 2,
- "hours": [
- 5,
- 11,
- 17,
- 23
- ],
- "timezoneOffset": -7
- },
- {
- "weekDay": 3,
- "hours": [
- 5,
- 11,
- 17,
- 23
- ],
- "timezoneOffset": -7
- },
- {
- "weekDay": 4,
- "hours": [
- 5,
- 11,
- 17,
- 23
- ],
- "timezoneOffset": -7
- },
- {
- "weekDay": 5,
- "hours": [
- 5,
- 11,
- 17,
- 23
- ],
- "timezoneOffset": -7
- },
- {
- "weekDay": 6,
- "hours": [
- 5,
- 11,
- 17,
- 23
- ],
- "timezoneOffset": -7
- }
- ],
- "searchTerms": [
- {
- "name": "isIssue",
- "parameters": {}
- },
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "DataGrid :capital_abcd:"
- }
- },
- {
- "name": "noActivitySince",
- "parameters": {
- "days": 45
- }
- }
- ],
- "actions": [
- {
- "name": "addReply",
- "parameters": {
- "comment": "Thanks ${issueAuthor} for patiently waiting while the team is still investigating the issue.\n\n@RBrid can we please have an update on this issue? Thanks "
- }
- }
- ],
- "taskName": "DataGrid notification to the team"
- },
- "disabled": true
- }
- ],
- "userGroups": []
-}
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index e1269ff7fd7..00000000000
--- a/.gitignore
+++ /dev/null
@@ -1,234 +0,0 @@
-## Ignore Visual Studio temporary files, build results, and
-## files generated by popular Visual Studio add-ons.
-
-# User-specific files
-*.suo
-*.user
-*.userosscache
-*.sln.docstates
-*.filters
-
-# User-specific files (MonoDevelop/Xamarin Studio)
-*.userprefs
-
-# Build results
-[Dd]ebug/
-[Dd]ebugPublic/
-[Rr]elease/
-[Rr]eleases/
-x64/
-x86/
-build/
-bld/
-[Bb]in/
-[Oo]bj/
-
-# Visual Studio 2015 cache/options directory
-.vs/
-
-# MSTest test Results
-[Tt]est[Rr]esult*/
-[Bb]uild[Ll]og.*
-
-# NUNIT
-*.VisualState.xml
-TestResult.xml
-
-# Build Results of an ATL Project
-[Dd]ebugPS/
-[Rr]eleasePS/
-dlldata.c
-
-# DNX
-project.lock.json
-artifacts/
-
-*_i.c
-*_p.c
-*_i.h
-*.ilk
-*.meta
-*.obj
-*.pch
-*.pdb
-*.pgc
-*.pgd
-*.rsp
-*.sbr
-*.tlb
-*.tli
-*.tlh
-*.tmp
-*.tmp_proj
-*.log
-*.vspscc
-*.vssscc
-.builds
-*.pidb
-*.svclog
-*.scc
-
-# Chutzpah Test files
-_Chutzpah*
-
-# Visual C++ cache files
-ipch/
-*.aps
-*.ncb
-*.opensdf
-*.sdf
-*.cachefile
-
-# Visual Studio profiler
-*.psess
-*.vsp
-*.vspx
-
-# TFS 2012 Local Workspace
-$tf/
-
-# Guidance Automation Toolkit
-*.gpState
-
-# ReSharper is a .NET coding add-in
-_ReSharper*/
-*.[Rr]e[Ss]harper
-*.DotSettings.user
-
-# JustCode is a .NET coding add-in
-.JustCode
-
-# TeamCity is a build add-in
-_TeamCity*
-
-# DotCover is a Code Coverage Tool
-*.dotCover
-
-# NCrunch
-_NCrunch_*
-.*crunch*.local.xml
-
-# 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
-## TODO: Comment the next line if you want to checkin your
-## web deploy settings but do note that will include unencrypted
-## passwords
-#*.pubxml
-
-*.publishproj
-
-# NuGet Packages
-*.nupkg
-# The packages folder can be ignored because of Package Restore
-**/packages/*
-# except build/, which is used as an MSBuild target.
-!**/packages/build/
-# Uncomment if necessary however generally it will be regenerated when needed
-#!**/packages/repositories.config
-
-# Windows Azure Build Output
-csx/
-*.build.csdef
-
-# Windows Store app package directory
-AppPackages/
-
-# 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/
-[Ss]tyle[Cc]op.*
-~$*
-*~
-*.dbmdl
-*.dbproj.schemaview
-*.pfx
-*.publishsettings
-node_modules/
-orleans.codegen.cs
-
-# 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
-
-# SQL Server files
-*.mdf
-*.ldf
-
-# Business Intelligence projects
-*.rdl.data
-*.bim.layout
-*.bim_*.settings
-
-# Microsoft Fakes
-FakesAssemblies/
-
-# Node.js Tools for Visual Studio
-.ntvs_analysis.dat
-
-# Visual Studio 6 build log
-*.plg
-
-# Visual Studio 6 workspace options file
-*.opt
-
-# LightSwitch generated files
-GeneratedArtifacts/
-_Pvt_Extensions/
-ModelManifest.xml
-BundleArtifacts
-!/build
-/build/tools/GitVersion.CommandLine
-AppPackages
-
-# NuGet V3 artifacts
-*-packages.config
-*.nuget.props
-*.nuget.targets
-project.lock.json
-msbuild.binlog
-*.project.lock.json
-/build/tools/**
-!/build/tools/packages.config
-
-# Generated file from .ttinclude
-**/Generated/TypeInfo.g.cs
-
-# TAEF Log output
-WexLogFileOutput
-*.wtl
diff --git a/.runsettings b/.runsettings
deleted file mode 100644
index 44f0672a141..00000000000
--- a/.runsettings
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
- 0
-
- 0
- ClassLevel
-
-
-
\ No newline at end of file
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
deleted file mode 100644
index 1f377cc3715..00000000000
--- a/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,76 +0,0 @@
-# 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 00000000000..e5278b4bffa
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,3 @@
+THIS REPO IS ARCHIVED AND DOES NOT ACCEPT PULL REQUESTS.
+
+Active development has moved to https://github.com/CommunityToolkit/Windows. We welcome you to visit us there. For details, please see [README.md](README.md).
diff --git a/Contributing.md b/Contributing.md
deleted file mode 100644
index f5e8ced4566..00000000000
--- a/Contributing.md
+++ /dev/null
@@ -1,46 +0,0 @@
-# ✨ 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 and feature requests. For general questions, 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/WindowsCommunityToolkitDocs/issues/new).
-
-## 🐛 Fix a Bug
-
-If you find any bug, you can help the community by [submitting an issue](https://github.com/CommunityToolkit/WindowsCommunityToolkit/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/WindowsCommunityToolkit/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/WindowsCommunityToolkit/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/WindowsCommunityToolkit/issues/new?template=feature_request.md&labels=feature+request+:mailbox_with_mail:&title=[Feature]) and provide detailed information to express the 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
deleted file mode 100644
index 63fd9d141d7..00000000000
--- a/Directory.Build.props
+++ /dev/null
@@ -1,77 +0,0 @@
-
-
-
- $(MSBuildThisFileDirectory)
- $(RepositoryDirectory)build\
-
-
-
-
-
-
-
- true
- $(RepositoryDirectory)bin\nupkg
- true
- true
-
-
-
-
- false
- false
- $(NoWarn);CS8002;SA0001
-
-
-
-
-
-
-
-
- $(NoWarn);CS8002
-
- true
-
-
-
-
-
-
-
-
- false
- false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- true
-
- true
-
- $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Directory.Build.targets b/Directory.Build.targets
deleted file mode 100644
index d719a7455cd..00000000000
--- a/Directory.Build.targets
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
- true
- false
-
-
-
-
-
-
- true
- $(MSBuildThisFileDirectory)toolkit.snk
-
-
-
-
-
-
-
-
-
-
-
- <_Parameter1>CommitHash
- <_Parameter2>$(SourceRevisionId)
-
-
-
-
-
\ No newline at end of file
diff --git a/GazeInputTest/App.xaml b/GazeInputTest/App.xaml
deleted file mode 100644
index 8ca88ca7b13..00000000000
--- a/GazeInputTest/App.xaml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/GazeInputTest/App.xaml.cs b/GazeInputTest/App.xaml.cs
deleted file mode 100644
index fbf9883454a..00000000000
--- a/GazeInputTest/App.xaml.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using Microsoft.Toolkit.Uwp.Input.GazeInteraction;
-using Windows.ApplicationModel;
-using Windows.ApplicationModel.Activation;
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Controls;
-using Windows.UI.Xaml.Navigation;
-
-namespace GazeInputTest
-{
- ///
- /// Provides application-specific behavior to supplement the default Application class.
- ///
- public sealed partial class App : Application
- {
- ///
- /// Initializes a new instance of the class.
- /// Initializes the singleton application object. This is the first line of authored code
- /// executed, and as such is the logical equivalent of main() or WinMain().
- ///
- public App()
- {
- this.InitializeComponent();
- this.Suspending += OnSuspending;
- }
-
- ///
- /// Invoked when the application is launched normally by the end user. Other entry points
- /// will be used such as when the application is launched to open a specific file.
- ///
- /// Details about the launch request and process.
- protected override void OnLaunched(LaunchActivatedEventArgs e)
- {
- Frame rootFrame = Window.Current.Content as Frame;
-
- // Do not repeat app initialization when the Window already has content,
- // just ensure that the window is active
- if (rootFrame == null)
- {
- // Create a Frame to act as the navigation context and navigate to the first page
- rootFrame = new Frame();
-
- rootFrame.NavigationFailed += OnNavigationFailed;
-
- if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
- {
- // TODO: Load state from previously suspended application
- }
-
- // Place the frame in the current Window
- Window.Current.Content = rootFrame;
- }
-
- if (e.PrelaunchActivated == false)
- {
- if (rootFrame.Content == null)
- {
- // When the navigation stack isn't restored navigate to the first page,
- // configuring the new page by passing required information as a navigation
- // parameter
- rootFrame.Navigate(typeof(MainPage), e.Arguments);
- }
-
- // Ensure the current window is active
- Window.Current.Activate();
- }
-
- GazeInput.Interaction = Interaction.Enabled;
- }
-
- ///
- /// Invoked when Navigation to a certain page fails
- ///
- /// The Frame which failed navigation
- /// Details about the navigation failure
- private void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
- {
- throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
- }
-
- ///
- /// Invoked when application execution is being suspended. Application state is saved
- /// without knowing whether the application will be terminated or resumed with the contents
- /// of memory still intact.
- ///
- /// The source of the suspend request.
- /// Details about the suspend request.
- private void OnSuspending(object sender, SuspendingEventArgs e)
- {
- var deferral = e.SuspendingOperation.GetDeferral();
-
- // TODO: Save application state and stop any background activity
- deferral.Complete();
- }
- }
-}
\ No newline at end of file
diff --git a/GazeInputTest/Assets/LockScreenLogo.scale-200.png b/GazeInputTest/Assets/LockScreenLogo.scale-200.png
deleted file mode 100644
index 735f57adb5d..00000000000
Binary files a/GazeInputTest/Assets/LockScreenLogo.scale-200.png and /dev/null differ
diff --git a/GazeInputTest/Assets/SplashScreen.scale-200.png b/GazeInputTest/Assets/SplashScreen.scale-200.png
deleted file mode 100644
index 023e7f1feda..00000000000
Binary files a/GazeInputTest/Assets/SplashScreen.scale-200.png and /dev/null differ
diff --git a/GazeInputTest/Assets/Square150x150Logo.scale-200.png b/GazeInputTest/Assets/Square150x150Logo.scale-200.png
deleted file mode 100644
index af49fec1a54..00000000000
Binary files a/GazeInputTest/Assets/Square150x150Logo.scale-200.png and /dev/null differ
diff --git a/GazeInputTest/Assets/Square44x44Logo.scale-200.png b/GazeInputTest/Assets/Square44x44Logo.scale-200.png
deleted file mode 100644
index ce342a2ec8a..00000000000
Binary files a/GazeInputTest/Assets/Square44x44Logo.scale-200.png and /dev/null differ
diff --git a/GazeInputTest/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/GazeInputTest/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
deleted file mode 100644
index f6c02ce97e0..00000000000
Binary files a/GazeInputTest/Assets/Square44x44Logo.targetsize-24_altform-unplated.png and /dev/null differ
diff --git a/GazeInputTest/Assets/StoreLogo.png b/GazeInputTest/Assets/StoreLogo.png
deleted file mode 100644
index 7385b56c0e4..00000000000
Binary files a/GazeInputTest/Assets/StoreLogo.png and /dev/null differ
diff --git a/GazeInputTest/Assets/Wide310x150Logo.scale-200.png b/GazeInputTest/Assets/Wide310x150Logo.scale-200.png
deleted file mode 100644
index 288995b397f..00000000000
Binary files a/GazeInputTest/Assets/Wide310x150Logo.scale-200.png and /dev/null differ
diff --git a/GazeInputTest/GazeInputTest.csproj b/GazeInputTest/GazeInputTest.csproj
deleted file mode 100644
index 28a650ed0be..00000000000
--- a/GazeInputTest/GazeInputTest.csproj
+++ /dev/null
@@ -1,160 +0,0 @@
-
-
-
- Debug
- x86
- {A122EA02-4DE7-413D-BFBF-AF7DFC668DD6}
- AppContainerExe
- Properties
- GazeInputTest
- GazeInputTest
- en-US
- UAP
- 10.0.19041.0
- 10.0.17763.0
- 14
- 512
- {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- true
- false
- $(NoWarn);2008
-
-
- true
- bin\x86\Debug\
- DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
- full
- x86
- false
- prompt
- true
-
-
- bin\x86\Release\
- TRACE;NETFX_CORE;WINDOWS_UWP
- true
- pdbonly
- x86
- false
- prompt
- true
- true
-
-
- true
- bin\ARM\Debug\
- DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
- full
- ARM
- false
- prompt
- true
-
-
- bin\ARM\Release\
- TRACE;NETFX_CORE;WINDOWS_UWP
- true
- pdbonly
- ARM
- false
- prompt
- true
- true
-
-
- true
- bin\ARM64\Debug\
- DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
- full
- ARM64
- false
- prompt
- true
-
-
- bin\ARM64\Release\
- TRACE;NETFX_CORE;WINDOWS_UWP
- true
- pdbonly
- ARM64
- false
- prompt
- true
- true
-
-
- true
- bin\x64\Debug\
- DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
- full
- x64
- false
- prompt
- true
-
-
- bin\x64\Release\
- TRACE;NETFX_CORE;WINDOWS_UWP
- true
- pdbonly
- x64
- false
- prompt
- true
- true
-
-
- PackageReference
-
-
-
- App.xaml
-
-
- MainPage.xaml
-
-
-
-
-
- Designer
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
-
-
-
-
- 6.2.12
-
-
-
-
- {5bf75694-798a-43a0-8150-415de195359c}
- Microsoft.Toolkit.Uwp.Input.GazeInteraction
-
-
-
- 14.0
-
-
-
-
-
\ No newline at end of file
diff --git a/GazeInputTest/MainPage.xaml b/GazeInputTest/MainPage.xaml
deleted file mode 100644
index 9713a83f476..00000000000
--- a/GazeInputTest/MainPage.xaml
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/GazeInputTest/MainPage.xaml.cs b/GazeInputTest/MainPage.xaml.cs
deleted file mode 100644
index 7696a8f07fe..00000000000
--- a/GazeInputTest/MainPage.xaml.cs
+++ /dev/null
@@ -1,111 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using Microsoft.Toolkit.Uwp.Input.GazeInteraction;
-using Windows.ApplicationModel.Core;
-using Windows.UI.Core;
-using Windows.UI.ViewManagement;
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Controls;
-
-namespace GazeInputTest
-{
- ///
- /// An empty page that can be used on its own or navigated to within a Frame.
- ///
- public sealed partial class MainPage : Page
- {
- public MainPage()
- {
- this.InitializeComponent();
-
- ShowCursor.IsChecked = GazeInput.GetIsCursorVisible(this);
-
- GazeInput.IsDeviceAvailableChanged += GazeInput_IsDeviceAvailableChanged;
- GazeInput_IsDeviceAvailableChanged(null, null);
- }
-
- private void GazeInput_IsDeviceAvailableChanged(object sender, object e)
- {
- DeviceAvailable.Text = GazeInput.IsDeviceAvailable ? "Eye tracker device available" : "No eye tracker device available";
- }
-
- private void OnStateChanged(object sender, StateChangedEventArgs ea)
- {
- Dwell.Content = ea.PointerState.ToString();
- }
-
- private void Dwell_Click(object sender, RoutedEventArgs e)
- {
- Dwell.Content = "Clicked";
- }
-
- private void ShowCursor_Toggle(object sender, RoutedEventArgs e)
- {
- if (ShowCursor.IsChecked.HasValue)
- {
- GazeInput.SetIsCursorVisible(this, ShowCursor.IsChecked.Value);
- }
- }
-
- private int _clickCount;
-
- private void OnLegacyInvoked(object sender, RoutedEventArgs e)
- {
- _clickCount++;
- HowButton.Content = string.Format("{0}: Legacy click", _clickCount);
- }
-
- private void OnGazeInvoked(object sender, DwellInvokedRoutedEventArgs e)
- {
- _clickCount++;
- HowButton.Content = string.Format("{0}: Accessible click", _clickCount);
- e.Handled = true;
- }
-
- private void OnInvokeProgress(object sender, DwellProgressEventArgs e)
- {
- if (e.State == DwellProgressState.Progressing)
- {
- ProgressShow.Value = 100.0 * e.Progress;
- }
-
- ProgressShow.IsIndeterminate = e.State == DwellProgressState.Complete;
- e.Handled = true;
- }
-
- private async void SpawnClicked(object sender, RoutedEventArgs e)
- {
- var newView = CoreApplication.CreateNewView();
- var newViewId = 0;
-
- await newView.Dispatcher.RunAsync(CoreDispatcherPriority.High, () =>
- {
- var frame = new Frame();
- frame.Navigate(typeof(MainPage), newViewId);
- Window.Current.Content = frame;
-
- // In Windows 10 UWP we need to activate our view first.
- // Let's do it now so that we can use TryShow...() and SwitchAsync().
- Window.Current.Activate();
-
- newViewId = ApplicationView.GetForCurrentView().Id;
- });
-
- bool viewShown = await ApplicationViewSwitcher.TryShowAsStandaloneAsync(newViewId);
- }
-
- private async void DialogClicked(object sender, RoutedEventArgs e)
- {
- var dialog = new ContentDialog
- {
- Title = "Sample Dialog",
- Content = "This is an example content dialog",
- CloseButtonText = "Close"
- };
- await dialog.ShowAsync();
- }
- }
-}
\ No newline at end of file
diff --git a/GazeInputTest/Package.appxmanifest b/GazeInputTest/Package.appxmanifest
deleted file mode 100644
index ac533010956..00000000000
--- a/GazeInputTest/Package.appxmanifest
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
-
-
-
-
- GazeInputTest
- harishsk
- Assets\StoreLogo.png
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/GazeInputTest/Properties/AssemblyInfo.cs b/GazeInputTest/Properties/AssemblyInfo.cs
deleted file mode 100644
index ac358b76a12..00000000000
--- a/GazeInputTest/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("GazeInputTest")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("GazeInputTest")]
-[assembly: AssemblyCopyright("Copyright © 2017")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-// [assembly: AssemblyVersion("1.0.0.0")]
-// [assembly: AssemblyFileVersion("1.0.0.0")]
-[assembly: ComVisible(false)]
\ No newline at end of file
diff --git a/GazeInputTest/Properties/Default.rd.xml b/GazeInputTest/Properties/Default.rd.xml
deleted file mode 100644
index dc591a4ce9c..00000000000
--- a/GazeInputTest/Properties/Default.rd.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/License.md b/License.md
deleted file mode 100644
index 5aefa46c69b..00000000000
--- a/License.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# 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/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/BluetoothLEHelper.cs b/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/BluetoothLEHelper.cs
deleted file mode 100644
index c4d953f95d8..00000000000
--- a/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/BluetoothLEHelper.cs
+++ /dev/null
@@ -1,358 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Linq;
-using System.Threading;
-using System.Threading.Tasks;
-using Windows.Devices.Bluetooth;
-using Windows.Devices.Bluetooth.Advertisement;
-using Windows.Devices.Enumeration;
-using Windows.System;
-
-namespace Microsoft.Toolkit.Uwp.Connectivity
-{
- ///
- /// Context for the entire app. This is where all app wide variables are stored
- ///
- public class BluetoothLEHelper
- {
- ///
- /// AQS search string used to find bluetooth devices.
- ///
- private const string BluetoothLeDeviceWatcherAqs = "(System.Devices.Aep.ProtocolId:=\"{bb7bb05e-5972-42b5-94fc-76eaa7084d49}\")";
-
- ///
- /// We need to cache all DeviceInformation objects we get as they may
- /// get updated in the future. The update may make them eligible to be put on
- /// the displayed list.
- ///
- private readonly List _unusedDevices = new List();
-
- ///
- /// Reader/Writer lock for when we are updating the collection.
- ///
- private readonly ReaderWriterLockSlim _readerWriterLockSlim = new ReaderWriterLockSlim();
-
- ///
- /// Advertisement watcher used to find bluetooth devices.
- ///
- private BluetoothLEAdvertisementWatcher _advertisementWatcher;
-
- ///
- /// Device watcher used to find bluetooth devices
- ///
- private DeviceWatcher _deviceWatcher;
-
- ///
- /// The Bluetooth adapter.
- ///
- private BluetoothAdapter _adapter;
-
- ///
- /// Gets or sets which DispatcherQueue is used to dispatch UI updates.
- ///
- public DispatcherQueue DispatcherQueue { get; set; }
-
- ///
- /// Prevents a default instance of the class from being created.
- ///
- /// The DispatcherQueue that should be used to dispatch UI updates, or null if this is being called from the UI thread.
- private BluetoothLEHelper(DispatcherQueue dispatcherQueue = null)
- {
- DispatcherQueue = dispatcherQueue ?? DispatcherQueue.GetForCurrentThread();
-
-#pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
- Init();
-#pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
- }
-
- ///
- /// Gets the app context
- ///
- public static BluetoothLEHelper Context { get; } = new BluetoothLEHelper();
-
- ///
- /// Gets the list of available bluetooth devices
- ///
- public ObservableCollection BluetoothLeDevices { get; } = new ObservableCollection();
-
- ///
- /// Gets a value indicating whether app is currently enumerating
- ///
- public bool IsEnumerating
- {
- get
- {
- if (_advertisementWatcher == null)
- {
- _advertisementWatcher = new BluetoothLEAdvertisementWatcher();
- }
-
- return _advertisementWatcher.Status == BluetoothLEAdvertisementWatcherStatus.Started;
- }
- }
-
- ///
- /// Gets a value indicating whether peripheral mode is supported by this device
- ///
- public bool IsPeripheralRoleSupported => _adapter.IsPeripheralRoleSupported;
-
- ///
- /// Gets a value indicating whether central role is supported by this device
- ///
- public bool IsCentralRoleSupported => _adapter.IsCentralRoleSupported;
-
- ///
- /// An event for when the enumeration is complete.
- ///
- public event EventHandler EnumerationCompleted;
-
- ///
- /// Starts enumeration of bluetooth device
- ///
- public void StartEnumeration()
- {
- if (_advertisementWatcher?.Status == BluetoothLEAdvertisementWatcherStatus.Started || _deviceWatcher != null)
- {
- return;
- }
-
- // Additional properties we would like about the device.
- string[] requestedProperties =
- {
- "System.Devices.Aep.Category",
- "System.Devices.Aep.ContainerId",
- "System.Devices.Aep.DeviceAddress",
- "System.Devices.Aep.IsConnected",
- "System.Devices.Aep.IsPaired",
- "System.Devices.Aep.IsPresent",
- "System.Devices.Aep.ProtocolId",
- "System.Devices.Aep.Bluetooth.Le.IsConnectable",
- "System.Devices.Aep.SignalStrength"
- };
-
- // BT_Code: Currently Bluetooth APIs don't provide a selector to get ALL devices that are both paired and non-paired.
- _deviceWatcher = DeviceInformation.CreateWatcher(
- BluetoothLeDeviceWatcherAqs,
- requestedProperties,
- DeviceInformationKind.AssociationEndpoint);
-
- // Register event handlers before starting the watcher.
- _deviceWatcher.Added += DeviceWatcher_Added;
- _deviceWatcher.Updated += DeviceWatcher_Updated;
- _deviceWatcher.Removed += DeviceWatcher_Removed;
- _deviceWatcher.EnumerationCompleted += DeviceWatcher_EnumerationCompleted;
-
- _advertisementWatcher = new BluetoothLEAdvertisementWatcher();
- _advertisementWatcher.Received += AdvertisementWatcher_Received;
-
- BluetoothLeDevices.Clear();
-
- _deviceWatcher.Start();
- _advertisementWatcher.Start();
- }
-
- ///
- /// Stops enumeration of bluetooth device
- ///
- public void StopEnumeration()
- {
- if (_deviceWatcher != null)
- {
- _deviceWatcher.Added -= DeviceWatcher_Added;
- _deviceWatcher.Updated -= DeviceWatcher_Updated;
- _deviceWatcher.Removed -= DeviceWatcher_Removed;
- _deviceWatcher.EnumerationCompleted -= DeviceWatcher_EnumerationCompleted;
-
- _deviceWatcher.Stop();
- _deviceWatcher = null;
- }
-
- if (_advertisementWatcher != null)
- {
- _advertisementWatcher.Received -= AdvertisementWatcher_Received;
- _advertisementWatcher.Stop();
- _advertisementWatcher = null;
- }
- }
-
- ///
- /// Initializes the app context.
- ///
- /// A representing the asynchronous operation.
- private async Task Init()
- {
- _adapter = await BluetoothAdapter.GetDefaultAsync();
- }
-
- ///
- /// Updates device metadata based on advertisement received
- ///
- /// The Bluetooth LE Advertisement Watcher.
- /// The advertisement.
- private async void AdvertisementWatcher_Received(BluetoothLEAdvertisementWatcher sender, BluetoothLEAdvertisementReceivedEventArgs args)
- {
- await DispatcherQueue.EnqueueAsync(
- () =>
- {
- if (_readerWriterLockSlim.TryEnterReadLock(TimeSpan.FromSeconds(1)))
- {
- foreach (var device in BluetoothLeDevices)
- {
- if (device.BluetoothAddressAsUlong == args.BluetoothAddress)
- {
- device.ServiceCount = args.Advertisement.ServiceUuids.Count();
- }
- }
-
- _readerWriterLockSlim.ExitReadLock();
- }
- }, DispatcherQueuePriority.Normal);
- }
-
- ///
- /// Callback when a new device is found
- ///
- /// The device watcher.
- /// The update device information.
- private async void DeviceWatcher_Added(DeviceWatcher sender, DeviceInformation deviceInfo)
- {
- // Protect against race condition if the task runs after the app stopped the deviceWatcher.
- if (sender == _deviceWatcher)
- {
- await AddDeviceToList(deviceInfo);
- }
- }
-
- ///
- /// Executes when a device is updated
- ///
- /// The device watcher.
- /// The update device information.
- private async void DeviceWatcher_Updated(DeviceWatcher sender, DeviceInformationUpdate deviceInfoUpdate)
- {
- if (sender == _deviceWatcher)
- {
- ObservableBluetoothLEDevice device = null;
-
- device = BluetoothLeDevices.FirstOrDefault(i => i.DeviceInfo.Id == deviceInfoUpdate.Id);
-
- if (device != null)
- {
- await device.UpdateAsync(deviceInfoUpdate);
- }
-
- if (device == null)
- {
- if (_readerWriterLockSlim.TryEnterWriteLock(TimeSpan.FromSeconds(2)))
- {
- var unusedDevice = _unusedDevices.FirstOrDefault(i => i.Id == deviceInfoUpdate.Id);
-
- if (unusedDevice != null)
- {
- _unusedDevices.Remove(unusedDevice);
- unusedDevice.Update(deviceInfoUpdate);
- }
-
- _readerWriterLockSlim.ExitWriteLock();
-
- // The update to the unknown device means we should move it to the Bluetooth LE Device collection.
- if (unusedDevice != null)
- {
- await AddDeviceToList(unusedDevice);
- }
- }
- }
- }
- }
-
- ///
- /// Executes when a device is removed from enumeration
- ///
- /// The device watcher.
- /// An update of the device.
- private async void DeviceWatcher_Removed(DeviceWatcher sender, DeviceInformationUpdate deviceInfoUpdate)
- {
- // Protect against race condition if the task runs after the app stopped the deviceWatcher.
- if (sender == _deviceWatcher)
- {
- await DispatcherQueue.EnqueueAsync(
- () =>
- {
- if (_readerWriterLockSlim.TryEnterWriteLock(TimeSpan.FromSeconds(1)))
- {
- var device = BluetoothLeDevices.FirstOrDefault(i => i.DeviceInfo.Id == deviceInfoUpdate.Id);
- BluetoothLeDevices.Remove(device);
-
- var unusedDevice = _unusedDevices.FirstOrDefault(i => i.Id == deviceInfoUpdate.Id);
- _unusedDevices?.Remove(unusedDevice);
-
- _readerWriterLockSlim.ExitWriteLock();
- }
- }, DispatcherQueuePriority.Normal);
- }
- }
-
- ///
- /// An event for when the enumeration is completed.
- ///
- /// The sender.
- /// The args.
- private void DeviceWatcher_EnumerationCompleted(DeviceWatcher sender, object args)
- {
- if (sender == _deviceWatcher)
- {
- StopEnumeration();
-
- EnumerationCompleted?.Invoke(sender, EventArgs.Empty);
- }
- }
-
- ///
- /// Adds the new or updated device to the displayed or unused list
- ///
- /// The device to add
- /// The task being used to add a device to a list
- private async Task AddDeviceToList(DeviceInformation deviceInfo)
- {
- // Make sure device name isn't blank or already present in the list.
- if (!string.IsNullOrEmpty(deviceInfo?.Name))
- {
- var device = new ObservableBluetoothLEDevice(deviceInfo, DispatcherQueue);
- var connectable = (device.DeviceInfo.Properties.Keys.Contains("System.Devices.Aep.Bluetooth.Le.IsConnectable") &&
- (bool)device.DeviceInfo.Properties["System.Devices.Aep.Bluetooth.Le.IsConnectable"]) ||
- (device.DeviceInfo.Properties.Keys.Contains("System.Devices.Aep.IsConnected") &&
- (bool)device.DeviceInfo.Properties["System.Devices.Aep.IsConnected"]);
-
- if (connectable)
- {
- await DispatcherQueue.EnqueueAsync(
- () =>
- {
- if (_readerWriterLockSlim.TryEnterWriteLock(TimeSpan.FromSeconds(1)))
- {
- if (!BluetoothLeDevices.Contains(device))
- {
- BluetoothLeDevices.Add(device);
- }
-
- _readerWriterLockSlim.ExitWriteLock();
- }
- }, DispatcherQueuePriority.Normal);
-
- return;
- }
- }
-
- if (_readerWriterLockSlim.TryEnterWriteLock(TimeSpan.FromSeconds(1)))
- {
- _unusedDevices.Add(deviceInfo);
- _readerWriterLockSlim.ExitWriteLock();
- }
- }
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/GattConvert.cs b/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/GattConvert.cs
deleted file mode 100644
index 658c4b22209..00000000000
--- a/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/GattConvert.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using System.Text;
-using Windows.Security.Cryptography;
-using Windows.Storage.Streams;
-
-namespace Microsoft.Toolkit.Uwp.Connectivity
-{
- ///
- /// Extension methods for Gatt Convert.
- ///
- public static class GattConvert
- {
- ///
- /// Convert an IBuffer to a UTF8 string.
- ///
- /// The buffer.
- /// A UTF 8 string.
- public static string ToUTF8String(IBuffer buffer)
- {
- CryptographicBuffer.CopyToByteArray(buffer, out byte[] data);
- return Encoding.UTF8.GetString(data);
- }
-
- ///
- /// Convert an IBuffer to a UTF16 string.
- ///
- /// The buffer.
- /// A UTF 16 string.
- public static string ToUTF16String(IBuffer buffer)
- {
- CryptographicBuffer.CopyToByteArray(buffer, out byte[] data);
- return Encoding.Unicode.GetString(data);
- }
-
- ///
- /// Convert an IBuffer to a 32 bit integer.
- ///
- /// The buffer.
- /// A 32 bit integer.
- public static int ToInt32(IBuffer buffer)
- {
- CryptographicBuffer.CopyToByteArray(buffer, out byte[] data);
- data = GetBytes(data, 4);
- return BitConverter.ToInt32(data, 0);
- }
-
- ///
- /// Convert an IBuffer to a hex string.
- ///
- /// The buffer.
- /// A hex string.
- public static string ToHexString(IBuffer buffer)
- {
- CryptographicBuffer.CopyToByteArray(buffer, out byte[] data);
- return BitConverter.ToString(data);
- }
-
- ///
- /// Takes an input array of bytes and returns an array with more zeros in the front
- ///
- /// A byte array to convert.
- /// The length of the byte array.
- /// A byte array with more zeros in front"/>
- private static byte[] GetBytes(byte[] input, int length)
- {
- var result = new byte[length];
-
- if (input.Length >= length)
- {
- result = input;
- }
-
- var offset = length - input.Length;
- for (var i = 0; i < input.Length; i++)
- {
- result[offset + i] = input[i];
- }
-
- if (BitConverter.IsLittleEndian)
- {
- Array.Reverse(result);
- }
-
- return result;
- }
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/GattNativeUuid.cs b/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/GattNativeUuid.cs
deleted file mode 100644
index c651696d7bc..00000000000
--- a/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/GattNativeUuid.cs
+++ /dev/null
@@ -1,745 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-namespace Microsoft.Toolkit.Uwp.Connectivity
-{
- ///
- /// This enum assists in finding a string representation of a BT SIG assigned value for UUIDS
- /// Reference: https://developer.bluetooth.org/gatt/services/Pages/ServicesHome.aspx
- /// Reference: https://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicsHome.aspx
- /// Reference: https://developer.bluetooth.org/gatt/descriptors/Pages/DescriptorsHomePage.aspx
- ///
- public enum GattNativeUuid : ushort
- {
- ///
- /// None.
- ///
- None = 0,
-
- ///
- /// The alert notification service.
- ///
- AlertNotificationService = 0x1811,
-
- ///
- /// The automation IO.
- ///
- AutomationIO = 0x1815,
-
- ///
- /// The battery service.
- ///
- BatteryService = 0x180F,
-
- ///
- /// The blood pressure.
- ///
- BloodPressure = 0x1810,
-
- ///
- /// The body composition.
- ///
- BodyComposition = 0x181B,
-
- ///
- /// The bond management.
- ///
- BondManagement = 0x181E,
-
- ///
- /// The continuous glucose monitoring.
- ///
- ContinuousGlucoseMonitoring = 0x181F,
-
- ///
- /// The current time service.
- ///
- CurrentTimeService = 0x1805,
-
- ///
- /// The cycling power.
- ///
- CyclingPower = 0x1818,
-
- ///
- /// The cycling speed and cadence.
- ///
- CyclingSpeedAndCadence = 0x1816,
-
- ///
- /// The device information.
- ///
- DeviceInformation = 0x180A,
-
- ///
- /// The environmental sensing.
- ///
- EnvironmentalSensing = 0x181A,
-
- ///
- /// The generic access.
- ///
- GenericAccess = 0x1800,
-
- ///
- /// The generic attribute.
- ///
- GenericAttribute = 0x1801,
-
- ///
- /// The glucose.
- ///
- Glucose = 0x1808,
-
- ///
- /// The health thermometer.
- ///
- HealthThermometer = 0x1809,
-
- ///
- /// The heart rate.
- ///
- HeartRate = 0x180D,
-
- ///
- /// The Http proxy.
- ///
- HttpProxy = 0x1823,
-
- ///
- /// The human interface device.
- ///
- HumanInterfaceDevice = 0x1812,
-
- ///
- /// The immediate alert.
- ///
- ImmediateAlert = 0x1802,
-
- ///
- /// The indoor positioning.
- ///
- IndoorPositioning = 0x1821,
-
- ///
- /// The internet protocol support.
- ///
- InternetProtocolSupport = 0x1820,
-
- ///
- /// The link loss.
- ///
- LinkLoss = 0x1803,
-
- ///
- /// The location and navigation.
- ///
- LocationAndNavigation = 0x1819,
-
- ///
- /// The next DST change service.
- ///
- NextDSTChangeService = 0x1807,
-
- ///
- /// The object transfer.
- ///
- ObjectTransfer = 0x1825,
-
- ///
- /// The phone alert status service.
- ///
- PhoneAlertStatusService = 0x180E,
-
- ///
- /// The pulse oximeter.
- ///
- PulseOximeter = 0x1822,
-
- ///
- /// The reference time update service.
- ///
- ReferenceTimeUpdateService = 0x1806,
-
- ///
- /// The running speed and cadence.
- ///
- RunningSpeedAndCadence = 0x1814,
-
- ///
- /// The scan parameters.
- ///
- ScanParameters = 0x1813,
-
- ///
- /// The transport discovery.
- ///
- TransportDiscovery = 0x1824,
-
- ///
- /// The tx power.
- ///
- TxPower = 0x1804,
-
- ///
- /// The user data.
- ///
- UserData = 0x181C,
-
- ///
- /// The weight scale.
- ///
- WeightScale = 0x181D,
-
- ///
- /// The alert category identifier.
- ///
- AlertCategoryID = 0x2A43,
-
- ///
- /// The alert category identifier bit mask.
- ///
- AlertCategoryIDBitMask = 0x2A42,
-
- ///
- /// The alert level.
- ///
- AlertLevel = 0x2A06,
-
- ///
- /// The alert notification control point.
- ///
- AlertNotificationControlPoint = 0x2A44,
-
- ///
- /// The alert status.
- ///
- AlertStatus = 0x2A3F,
-
- ///
- /// The appearance.
- ///
- Appearance = 0x2A01,
-
- ///
- /// The battery level.
- ///
- BatteryLevel = 0x2A19,
-
- ///
- /// The blood pressure feature.
- ///
- BloodPressureFeature = 0x2A49,
-
- ///
- /// The blood pressure measurement.
- ///
- BloodPressureMeasurement = 0x2A35,
-
- ///
- /// The body sensor location.
- ///
- BodySensorLocation = 0x2A38,
-
- ///
- /// The boot keyboard input report.
- ///
- BootKeyboardInputReport = 0x2A22,
-
- ///
- /// The boot keyboard output report.
- ///
- BootKeyboardOutputReport = 0x2A32,
-
- ///
- /// The boot mouse input report.
- ///
- BootMouseInputReport = 0x2A33,
-
- ///
- /// The CSC feature.
- ///
- CSCFeature = 0x2A5C,
-
- ///
- /// The CSC measurement.
- ///
- CSCMeasurement = 0x2A5B,
-
- ///
- /// The current time.
- ///
- CurrentTime = 0x2A2B,
-
- ///
- /// The date time.
- ///
- DateTime = 0x2A08,
-
- ///
- /// The day date time.
- ///
- DayDateTime = 0x2A0A,
-
- ///
- /// The day of week.
- ///
- DayOfWeek = 0x2A09,
-
- ///
- /// The device name.
- ///
- DeviceName = 0x2A00,
-
- ///
- /// The DST offset.
- ///
- DSTOffset = 0x2A0D,
-
- ///
- /// The exact time 256.
- ///
- ExactTime256 = 0x2A0C,
-
- ///
- /// The firmware revision string
- ///
- FirmwareRevisionString = 0x2A26,
-
- ///
- /// The glucose feature
- ///
- GlucoseFeature = 0x2A51,
-
- ///
- /// The glucose measurement
- ///
- GlucoseMeasurement = 0x2A18,
-
- ///
- /// The glucose measurement context
- ///
- GlucoseMeasurementContext = 0x2A34,
-
- ///
- /// The hardware revision string
- ///
- HardwareRevisionString = 0x2A27,
-
- ///
- /// The heart rate control point
- ///
- HeartRateControlPoint = 0x2A39,
-
- ///
- /// The heart rate measurement
- ///
- HeartRateMeasurement = 0x2A37,
-
- ///
- /// The hid control point
- ///
- HIDControlPoint = 0x2A4C,
-
- ///
- /// The hid information
- ///
- HIDInformation = 0x2A4A,
-
- ///
- /// The iee e11073 20601 regulatory certification data list
- ///
- IEEE11073_20601RegulatoryCertificationDataList = 0x2A2A,
-
- ///
- /// The intermediate cuff pressure
- ///
- IntermediateCuffPressure = 0x2A36,
-
- ///
- /// The intermediate temperature
- ///
- IntermediateTemperature = 0x2A1E,
-
- ///
- /// The local time information
- ///
- LocalTimeInformation = 0x2A0F,
-
- ///
- /// The manufacturer name string
- ///
- ManufacturerNameString = 0x2A29,
-
- ///
- /// The measurement interval
- ///
- MeasurementInterval = 0x2A21,
-
- ///
- /// The model number string
- ///
- ModelNumberString = 0x2A24,
-
- ///
- /// The new alert
- ///
- NewAlert = 0x2A46,
-
- ///
- /// The peripheral preferred connection parameters
- ///
- PeripheralPreferredConnectionParameters = 0x2A04,
-
- ///
- /// The peripheral privacy flag
- ///
- PeripheralPrivacyFlag = 0x2A02,
-
- ///
- /// The pn pid
- ///
- PnPID = 0x2A50,
-
- ///
- /// The protocol mode
- ///
- ProtocolMode = 0x2A4E,
-
- ///
- /// The reconnection address
- ///
- ReconnectionAddress = 0x2A03,
-
- ///
- /// The record access control point
- ///
- RecordAccessControlPoint = 0x2A52,
-
- ///
- /// The reference time information
- ///
- ReferenceTimeInformation = 0x2A14,
-
- ///
- /// The report
- ///
- Report = 0x2A4D,
-
- ///
- /// The report map
- ///
- ReportMap = 0x2A4B,
-
- ///
- /// The ringer control point
- ///
- RingerControlPoint = 0x2A40,
-
- ///
- /// The ringer setting
- ///
- RingerSetting = 0x2A41,
-
- ///
- /// The RSC feature
- ///
- RSCFeature = 0x2A54,
-
- ///
- /// The RSC measurement
- ///
- RSCMeasurement = 0x2A53,
-
- ///
- /// The sc control point
- ///
- SCControlPoint = 0x2A55,
-
- ///
- /// The scan interval window
- ///
- ScanIntervalWindow = 0x2A4F,
-
- ///
- /// The scan refresh
- ///
- ScanRefresh = 0x2A31,
-
- ///
- /// The sensor location
- ///
- SensorLocation = 0x2A5D,
-
- ///
- /// The serial number string
- ///
- SerialNumberString = 0x2A25,
-
- ///
- /// The service changed
- ///
- ServiceChanged = 0x2A05,
-
- ///
- /// The software revision string
- ///
- SoftwareRevisionString = 0x2A28,
-
- ///
- /// The supported new alert category
- ///
- SupportedNewAlertCategory = 0x2A47,
-
- ///
- /// The supported unread alert category
- ///
- SupportedUnreadAlertCategory = 0x2A48,
-
- ///
- /// The system identifier
- ///
- SystemID = 0x2A23,
-
- ///
- /// The temperature measurement
- ///
- TemperatureMeasurement = 0x2A1C,
-
- ///
- /// The temperature type
- ///
- TemperatureType = 0x2A1D,
-
- ///
- /// The time accuracy
- ///
- TimeAccuracy = 0x2A12,
-
- ///
- /// The time source
- ///
- TimeSource = 0x2A13,
-
- ///
- /// The time update control point
- ///
- TimeUpdateControlPoint = 0x2A16,
-
- ///
- /// The time update state
- ///
- TimeUpdateState = 0x2A17,
-
- ///
- /// The time with DST
- ///
- TimeWithDST = 0x2A11,
-
- ///
- /// The time zone
- ///
- TimeZone = 0x2A0E,
-
- ///
- /// The tx power level
- ///
- TxPowerLevel = 0x2A07,
-
- ///
- /// The unread alert status
- ///
- UnreadAlertStatus = 0x2A45,
-
- ///
- /// The aggregate input
- ///
- AggregateInput = 0x2A5A,
-
- ///
- /// The analog input
- ///
- AnalogInput = 0x2A58,
-
- ///
- /// The analog output
- ///
- AnalogOutput = 0x2A59,
-
- ///
- /// The cycling power control point
- ///
- CyclingPowerControlPoint = 0x2A66,
-
- ///
- /// The cycling power feature
- ///
- CyclingPowerFeature = 0x2A65,
-
- ///
- /// The cycling power measurement
- ///
- CyclingPowerMeasurement = 0x2A63,
-
- ///
- /// The cycling power vector
- ///
- CyclingPowerVector = 0x2A64,
-
- ///
- /// The digital input
- ///
- DigitalInput = 0x2A56,
-
- ///
- /// The digital output
- ///
- DigitalOutput = 0x2A57,
-
- ///
- /// The exact time100
- ///
- ExactTime100 = 0x2A0B,
-
- ///
- /// The ln control point
- ///
- LNControlPoint = 0x2A6B,
-
- ///
- /// The ln feature
- ///
- LNFeature = 0x2A6A,
-
- ///
- /// The location and speed
- ///
- LocationAndSpeed = 0x2A67,
-
- ///
- /// The navigation
- ///
- Navigation = 0x2A68,
-
- ///
- /// The network availability
- ///
- NetworkAvailability = 0x2A3E,
-
- ///
- /// The position quality
- ///
- PositionQuality = 0x2A69,
-
- ///
- /// The scientific temperature in Celsius
- ///
- ScientificTemperatureInCelsius = 0x2A3C,
-
- ///
- /// The secondary time zone
- ///
- SecondaryTimeZone = 0x2A10,
-
- ///
- /// The string
- ///
- String = 0x2A3D,
-
- ///
- /// The temperature in Celsius
- ///
- TemperatureInCelsius = 0x2A1F,
-
- ///
- /// The temperature in Fahrenheit
- ///
- TemperatureInFahrenheit = 0x2A20,
-
- ///
- /// The time broadcast
- ///
- TimeBroadcast = 0x2A15,
-
- ///
- /// The battery level state
- ///
- BatteryLevelState = 0x2A1B,
-
- ///
- /// The battery power state
- ///
- BatteryPowerState = 0x2A1A,
-
- ///
- /// The pulse oximetry continuous measurement
- ///
- PulseOximetryContinuousMeasurement = 0x2A5F,
-
- ///
- /// The pulse oximetry control point
- ///
- PulseOximetryControlPoint = 0x2A62,
-
- ///
- /// The pulse oximetry features
- ///
- PulseOximetryFeatures = 0x2A61,
-
- ///
- /// The pulse oximetry pulsatile event
- ///
- PulseOximetryPulsatileEvent = 0x2A60,
-
- ///
- /// The simple key state
- ///
- SimpleKeyState = 0xFFE1,
-
- ///
- /// The characteristic extended properties
- ///
- CharacteristicExtendedProperties = 0x2900,
-
- ///
- /// The characteristic user description
- ///
- CharacteristicUserDescription = 0x2901,
-
- ///
- /// The client characteristic configuration
- ///
- ClientCharacteristicConfiguration = 0x2902,
-
- ///
- /// The server characteristic configuration
- ///
- ServerCharacteristicConfiguration = 0x2903,
-
- ///
- /// The characteristic presentation format
- ///
- CharacteristicPresentationFormat = 0x2904,
-
- ///
- /// The characteristic aggregate format
- ///
- CharacteristicAggregateFormat = 0x2905,
-
- ///
- /// The valid range
- ///
- ValidRange = 0x2906,
-
- ///
- /// The external report reference
- ///
- ExternalReportReference = 0x2907,
-
- ///
- /// The report reference
- ///
- ReportReference = 0x2908
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/GattProtocolErrorParser.cs b/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/GattProtocolErrorParser.cs
deleted file mode 100644
index aa76899f352..00000000000
--- a/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/GattProtocolErrorParser.cs
+++ /dev/null
@@ -1,116 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using Windows.Devices.Bluetooth.GenericAttributeProfile;
-
-namespace Microsoft.Toolkit.Uwp.Connectivity
-{
- ///
- /// Helper function when working with
- ///
- public static class GattProtocolErrorParser
- {
- ///
- /// Helper to convert an Gatt error value into a string
- ///
- /// the byte error value.
- /// String representation of the error
- public static string GetErrorString(this byte? errorValue)
- {
- var errorString = "Protocol Error";
-
- if (errorValue.HasValue == false)
- {
- return errorString;
- }
-
- if (errorValue == GattProtocolError.AttributeNotFound)
- {
- return "Attribute Not Found";
- }
-
- if (errorValue == GattProtocolError.AttributeNotLong)
- {
- return "Attribute Not Long";
- }
-
- if (errorValue == GattProtocolError.InsufficientAuthentication)
- {
- return "Insufficient Authentication";
- }
-
- if (errorValue == GattProtocolError.InsufficientAuthorization)
- {
- return "Insufficient Authorization";
- }
-
- if (errorValue == GattProtocolError.InsufficientEncryption)
- {
- return "Insufficient Encryption";
- }
-
- if (errorValue == GattProtocolError.InsufficientEncryptionKeySize)
- {
- return "Insufficient Encryption Key Size";
- }
-
- if (errorValue == GattProtocolError.InsufficientResources)
- {
- return "Insufficient Resources";
- }
-
- if (errorValue == GattProtocolError.InvalidAttributeValueLength)
- {
- return "Invalid Attribute Value Length";
- }
-
- if (errorValue == GattProtocolError.InvalidHandle)
- {
- return "Invalid Handle";
- }
-
- if (errorValue == GattProtocolError.InvalidOffset)
- {
- return "Invalid Offset";
- }
-
- if (errorValue == GattProtocolError.InvalidPdu)
- {
- return "Invalid Pdu";
- }
-
- if (errorValue == GattProtocolError.PrepareQueueFull)
- {
- return "Prepare Queue Full";
- }
-
- if (errorValue == GattProtocolError.ReadNotPermitted)
- {
- return "Read Not Permitted";
- }
-
- if (errorValue == GattProtocolError.RequestNotSupported)
- {
- return "Request Not Supported";
- }
-
- if (errorValue == GattProtocolError.UnlikelyError)
- {
- return "UnlikelyError";
- }
-
- if (errorValue == GattProtocolError.UnsupportedGroupType)
- {
- return "Unsupported Group Type";
- }
-
- if (errorValue == GattProtocolError.WriteNotPermitted)
- {
- return "Write Not Permitted";
- }
-
- return errorString;
- }
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/GattUuidsService.cs b/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/GattUuidsService.cs
deleted file mode 100644
index d6978b8f448..00000000000
--- a/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/GattUuidsService.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-
-namespace Microsoft.Toolkit.Uwp.Connectivity
-{
- ///
- /// Helper class used when working with UUIDs
- ///
- public static class GattUuidsService
- {
- ///
- /// Helper function to convert a UUID to a name
- ///
- /// The UUID guid.
- /// Name of the UUID
- public static string ConvertUuidToName(Guid uuid)
- {
- GattNativeUuid name;
-
- if (Enum.TryParse(ConvertUuidToShortId(uuid).ToString(), out name))
- {
- return name.ToString();
- }
-
- return uuid.ToString();
- }
-
- ///
- /// Converts from standard 128bit UUID to the assigned 32bit UUIDs. Makes it easy to compare services
- /// that devices expose to the standard list.
- ///
- /// UUID to convert to 32 bit
- /// 32bit version of the input UUID
- public static ushort ConvertUuidToShortId(Guid uuid)
- {
- var bytes = uuid.ToByteArray();
- var shortUuid = (ushort)(bytes[0] | (bytes[1] << 8));
-
- return shortUuid;
- }
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/ObservableBluetoothLEDevice.cs b/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/ObservableBluetoothLEDevice.cs
deleted file mode 100644
index c2c3f1ba2d7..00000000000
--- a/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/ObservableBluetoothLEDevice.cs
+++ /dev/null
@@ -1,555 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel;
-using System.Linq;
-using System.Runtime.CompilerServices;
-using System.Threading;
-using System.Threading.Tasks;
-using Windows.Devices.Bluetooth;
-using Windows.Devices.Bluetooth.GenericAttributeProfile;
-using Windows.Devices.Enumeration;
-using Windows.System;
-using Windows.UI.Xaml.Media.Imaging;
-
-namespace Microsoft.Toolkit.Uwp.Connectivity
-{
- ///
- /// Wrapper around to make it bindable.
- ///
- ///
- ///
- public class ObservableBluetoothLEDevice : INotifyPropertyChanged, IEquatable
- {
- ///
- /// Compares RSSI values between ObservableBluetoothLEDevice. Sorts based on closest to furthest where 0 is unknown
- /// and is sorted as furthest away
- ///
- public class RSSIComparer : IComparer
- {
- ///
- /// Compares two and returns a value indicating
- /// whether one is less than, equal to, or greater than the other.
- ///
- /// First object to compare
- /// Second object to compare
- /// Returns 0 if equal
- public int Compare(object x, object y)
- {
- ObservableBluetoothLEDevice a = x as ObservableBluetoothLEDevice;
- ObservableBluetoothLEDevice b = y as ObservableBluetoothLEDevice;
-
- if (a == null || b == null)
- {
- throw new InvalidOperationException("Compared objects are not ObservableBluetoothLEDevice");
- }
-
- // If they're equal
- if (a.RSSI == b.RSSI)
- {
- return 0;
- }
-
- // RSSI == 0 means we don't know it. Always make that the end.
- if (b.RSSI == 0)
- {
- return -1;
- }
-
- if (a.RSSI < b.RSSI || a.RSSI == 0)
- {
- return 1;
- }
- else
- {
- return -1;
- }
- }
- }
-
- ///
- /// Source for
- ///
- private BluetoothLEDevice _bluetoothLeDevice;
-
- ///
- /// Source for
- ///
- private DeviceInformation _deviceInfo;
-
- ///
- /// Source for
- ///
- private string _errorText;
-
- ///
- /// Source for
- ///
- private BitmapImage _glyph;
-
- ///
- /// Source for
- ///
- private bool _isConnected;
-
- ///
- /// Source for
- ///
- private bool _isPaired;
-
- ///
- /// Source for
- ///
- private string _name;
-
- ///
- /// result of finding all the services
- ///
- private GattDeviceServicesResult _result;
-
- ///
- /// Queue to store the last 10 observed RSSI values
- ///
- private Queue _rssiValue = new Queue(10);
-
- ///
- /// Source for
- ///
- private int _rssi;
-
- ///
- /// Source for
- ///
- private int _serviceCount;
-
- ///
- /// Source for
- ///
- private ObservableCollection _services =
- new ObservableCollection();
-
- ///
- /// Gets or sets which DispatcherQueue is used to dispatch UI updates.
- ///
- public DispatcherQueue DispatcherQueue { get; set; }
-
- ///
- /// Initializes a new instance of the class.
- ///
- /// The device information.
- /// The DispatcherQueue that should be used to dispatch UI updates for this BluetoothLE Device, or null if this is being called from the UI thread.
- public ObservableBluetoothLEDevice(DeviceInformation deviceInfo, DispatcherQueue dispatcherQueue = null)
- {
- DeviceInfo = deviceInfo;
- Name = DeviceInfo.Name;
-
- IsPaired = DeviceInfo.Pairing.IsPaired;
-
- DispatcherQueue = dispatcherQueue ?? DispatcherQueue.GetForCurrentThread();
-
- LoadGlyph();
-
- this.PropertyChanged += ObservableBluetoothLEDevice_PropertyChanged;
- }
-
- ///
- /// Gets the bluetooth device this class wraps
- ///
- /// The bluetooth le device.
- public BluetoothLEDevice BluetoothLEDevice
- {
- get
- {
- return _bluetoothLeDevice;
- }
-
- private set
- {
- _bluetoothLeDevice = value;
- OnPropertyChanged();
- }
- }
-
- ///
- /// Gets or sets the glyph of this bluetooth device
- ///
- /// The glyph.
- public BitmapImage Glyph
- {
- get
- {
- return _glyph;
- }
-
- set
- {
- _glyph = value;
- OnPropertyChanged();
- }
- }
-
- ///
- /// Gets the device information for the device this class wraps
- ///
- /// The device information.
- public DeviceInformation DeviceInfo
- {
- get
- {
- return _deviceInfo;
- }
-
- private set
- {
- _deviceInfo = value;
- OnPropertyChanged();
- }
- }
-
- ///
- /// Gets a value indicating whether this device is connected
- ///
- /// true if this instance is connected; otherwise, false.
- public bool IsConnected
- {
- get
- {
- return _isConnected;
- }
-
- private set
- {
- if (_isConnected != value)
- {
- _isConnected = value;
- OnPropertyChanged();
- }
- }
- }
-
- ///
- /// Gets a value indicating whether this device is paired
- ///
- /// true if this instance is paired; otherwise, false.
- public bool IsPaired
- {
- get
- {
- return _isPaired;
- }
-
- private set
- {
- if (_isPaired != value)
- {
- _isPaired = value;
- OnPropertyChanged();
- }
- }
- }
-
- ///
- /// Gets the services this device supports
- ///
- /// The services.
- public ObservableCollection Services
- {
- get
- {
- return _services;
- }
-
- private set
- {
- _services = value;
- OnPropertyChanged();
- }
- }
-
- ///
- /// Gets or sets the number of services this device has
- ///
- /// The service count.
- public int ServiceCount
- {
- get
- {
- return _serviceCount;
- }
-
- set
- {
- if (_serviceCount != value)
- {
- _serviceCount = value;
- OnPropertyChanged();
- }
- }
- }
-
- ///
- /// Gets the name of this device
- ///
- /// The name.
- public string Name
- {
- get
- {
- return _name;
- }
-
- private set
- {
- if (_name != value)
- {
- _name = value;
- OnPropertyChanged();
- }
- }
- }
-
- ///
- /// Gets the error text when connecting to this device fails
- ///
- /// The error text.
- public string ErrorText
- {
- get
- {
- return _errorText;
- }
-
- private set
- {
- _errorText = value;
- OnPropertyChanged();
- }
- }
-
- ///
- /// Gets the RSSI value of this device
- ///
- public int RSSI
- {
- get
- {
- return _rssi;
- }
-
- private set
- {
- if (_rssiValue.Count >= 10)
- {
- _rssiValue.Dequeue();
- }
-
- _rssiValue.Enqueue(value);
-
- int newValue = (int)Math.Round(_rssiValue.Average(), 0);
-
- if (_rssi != newValue)
- {
- _rssi = newValue;
- OnPropertyChanged();
- }
- }
- }
-
- ///
- /// Gets the bluetooth address of this device as a string
- ///
- /// The bluetooth address as string.
- public string BluetoothAddressAsString => DeviceInfo.Properties["System.Devices.Aep.DeviceAddress"]?.ToString();
-
- ///
- /// Gets the bluetooth address of this device
- ///
- /// The bluetooth address as ulong.
- public ulong BluetoothAddressAsUlong => Convert.ToUInt64(
- BluetoothAddressAsString.Replace(":", string.Empty),
- 16);
-
- ///
- /// Compares this device to other bluetooth devices by checking the id
- ///
- /// The device to compare with.
- /// true for equal
- bool IEquatable.Equals(ObservableBluetoothLEDevice other)
- {
- return other?.DeviceInfo.Id != null && DeviceInfo.Id == other.DeviceInfo.Id;
- }
-
- private void ObservableBluetoothLEDevice_PropertyChanged(object sender, PropertyChangedEventArgs e)
- {
- if (e.PropertyName == "DeviceInfo")
- {
- if (DeviceInfo.Properties.ContainsKey("System.Devices.Aep.SignalStrength") && DeviceInfo.Properties["System.Devices.Aep.SignalStrength"] != null)
- {
- RSSI = (int)DeviceInfo.Properties["System.Devices.Aep.SignalStrength"];
- }
- }
- }
-
- ///
- /// ConnectAsync to this bluetooth device
- ///
- /// Connection task
- /// Throws Exception when no permission to access device
- public async Task ConnectAsync()
- {
- await DispatcherQueue.EnqueueAsync(
- async () =>
- {
- if (BluetoothLEDevice == null)
- {
- BluetoothLEDevice = await BluetoothLEDevice.FromIdAsync(DeviceInfo.Id);
-
- if (BluetoothLEDevice == null)
- {
- throw new Exception("Connection error, no permission to access device");
- }
- }
-
- BluetoothLEDevice.ConnectionStatusChanged += BluetoothLEDevice_ConnectionStatusChanged;
- BluetoothLEDevice.NameChanged += BluetoothLEDevice_NameChanged;
-
- IsPaired = DeviceInfo.Pairing.IsPaired;
- IsConnected = BluetoothLEDevice.ConnectionStatus == BluetoothConnectionStatus.Connected;
- Name = BluetoothLEDevice.Name;
-
- // Get all the services for this device
- var getGattServicesAsyncTokenSource = new CancellationTokenSource(5000);
- var getGattServicesAsyncTask = await
- Task.Run(
- () => BluetoothLEDevice.GetGattServicesAsync(BluetoothCacheMode.Uncached),
- getGattServicesAsyncTokenSource.Token);
-
- _result = await getGattServicesAsyncTask;
-
- if (_result.Status == GattCommunicationStatus.Success)
- {
- // In case we connected before, clear the service list and recreate it
- Services.Clear();
-
- foreach (var service in _result.Services)
- {
- Services.Add(new ObservableGattDeviceService(service));
- }
-
- ServiceCount = Services.Count;
- }
- else
- {
- if (_result.ProtocolError != null)
- {
- throw new Exception(_result.ProtocolError.GetErrorString());
- }
- }
- }, DispatcherQueuePriority.Normal);
- }
-
- ///
- /// Does the in application pairing
- ///
- /// Task.
- /// The status of the pairing.
- public async Task DoInAppPairingAsync()
- {
- var result = await DeviceInfo.Pairing.PairAsync();
-
- if (result.Status != DevicePairingResultStatus.Paired ||
- result.Status != DevicePairingResultStatus.AlreadyPaired)
- {
- throw new Exception(result.Status.ToString());
- }
- }
-
- ///
- /// Updates this device's deviceInformation
- ///
- /// The device information which has been updated.
- /// The task of the update.
- public async Task UpdateAsync(DeviceInformationUpdate deviceUpdate)
- {
- await DispatcherQueue.EnqueueAsync(
- () =>
- {
- DeviceInfo.Update(deviceUpdate);
- Name = DeviceInfo.Name;
-
- IsPaired = DeviceInfo.Pairing.IsPaired;
-
- LoadGlyph();
- OnPropertyChanged("DeviceInfo");
- }, DispatcherQueuePriority.Normal);
- }
-
- ///
- /// Overrides the ToString function to return the name of the device
- ///
- /// Name of this characteristic
- public override string ToString()
- {
- return Name;
- }
-
- ///
- /// Event to notify when this object has changed
- ///
- public event PropertyChangedEventHandler PropertyChanged;
-
- ///
- /// Property changed event invoker
- ///
- /// name of the property that changed
- protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
- {
- PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
- }
-
- ///
- /// Executes when the name of this devices changes
- ///
- /// The sender.
- /// The arguments.
- private async void BluetoothLEDevice_NameChanged(BluetoothLEDevice sender, object args)
- {
- await DispatcherQueue.EnqueueAsync(() => { Name = BluetoothLEDevice.Name; }, DispatcherQueuePriority.Normal);
- }
-
- ///
- /// Executes when the connection state changes
- ///
- /// The sender.
- /// The arguments.
- private async void BluetoothLEDevice_ConnectionStatusChanged(BluetoothLEDevice sender, object args)
- {
- await DispatcherQueue.EnqueueAsync(
- () =>
- {
- IsPaired = DeviceInfo.Pairing.IsPaired;
- IsConnected = BluetoothLEDevice.ConnectionStatus == BluetoothConnectionStatus.Connected;
- }, DispatcherQueuePriority.Normal);
- }
-
- ///
- /// Load the glyph for this device
- ///
- private async void LoadGlyph()
- {
- await DispatcherQueue.EnqueueAsync(
- async () =>
- {
- var deviceThumbnail = await DeviceInfo.GetGlyphThumbnailAsync();
- var glyphBitmapImage = new BitmapImage();
- await glyphBitmapImage.SetSourceAsync(deviceThumbnail);
- Glyph = glyphBitmapImage;
- }, DispatcherQueuePriority.Normal);
- }
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/ObservableGattCharacteristics.cs b/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/ObservableGattCharacteristics.cs
deleted file mode 100644
index febf872e026..00000000000
--- a/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/ObservableGattCharacteristics.cs
+++ /dev/null
@@ -1,614 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using System.ComponentModel;
-using System.Linq;
-using System.Runtime.CompilerServices;
-using System.Threading.Tasks;
-using Windows.Devices.Bluetooth;
-using Windows.Devices.Bluetooth.GenericAttributeProfile;
-using Windows.Security.Cryptography;
-using Windows.Storage.Streams;
-using Windows.System;
-
-namespace Microsoft.Toolkit.Uwp.Connectivity
-{
- ///
- /// Wrapper around to make it easier to use
- ///
- public class ObservableGattCharacteristics : INotifyPropertyChanged
- {
- ///
- /// Enum used to determine how the should be displayed
- ///
- public enum DisplayTypes
- {
- ///
- /// Not set
- ///
- NotSet,
-
- ///
- /// Bool
- ///
- Bool,
-
- ///
- /// Decimal
- ///
- Decimal,
-
- ///
- /// Hexadecimal
- ///
- Hex,
-
- ///
- /// UTF8
- ///
- Utf8,
-
- ///
- /// UTF16
- ///
- Utf16,
-
- ///
- /// Unsupported
- ///
- Unsupported
- }
-
- ///
- /// Source for
- ///
- private GattCharacteristic _characteristic;
-
- ///
- /// A byte array representation of the characteristic value
- ///
- private byte[] _data;
-
- ///
- /// Source for
- ///
- private bool _isIndicateSet;
-
- ///
- /// Source for
- ///
- private bool _isNotifySet;
-
- ///
- /// Raw buffer of this value of this characteristic
- ///
- private IBuffer _rawData;
-
- ///
- /// Source for
- ///
- private DisplayTypes _displayType = DisplayTypes.NotSet;
-
- ///
- /// Source for
- ///
- private string _name;
-
- ///
- /// Source for
- ///
- private ObservableGattDeviceService _parent;
-
- ///
- /// Source for
- ///
- private string _uuid;
-
- ///
- /// Source for
- ///
- private string _value;
-
- ///
- /// Gets or sets which DispatcherQueue is used to dispatch UI updates.
- ///
- public DispatcherQueue DispatcherQueue { get; set; }
-
- ///
- /// Initializes a new instance of the class.
- ///
- /// The characteristic.
- /// The parent.
- /// The DispatcherQueue that should be used to dispatch UI updates, or null if this is being called from the UI thread.
- public ObservableGattCharacteristics(GattCharacteristic characteristic, ObservableGattDeviceService parent, DispatcherQueue dispatcherQueue = null)
- {
- DispatcherQueue = dispatcherQueue ?? DispatcherQueue.GetForCurrentThread();
-
- Characteristic = characteristic;
- Parent = parent;
- Name = GattUuidsService.ConvertUuidToName(Characteristic.Uuid);
- UUID = Characteristic.Uuid.ToString();
-
-#pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
- ReadValueAsync();
-#pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
- }
-
- ///
- /// Gets or sets the characteristic this class wraps
- ///
- public GattCharacteristic Characteristic
- {
- get
- {
- return _characteristic;
- }
-
- set
- {
- if (_characteristic != value)
- {
- if (value is not null)
- {
- value.ValueChanged += Characteristic_ValueChanged;
- }
-
- if (_characteristic is not null)
- {
- _characteristic.ValueChanged -= Characteristic_ValueChanged;
- }
-
- _characteristic = value;
- OnPropertyChanged();
- }
- }
- }
-
- ///
- /// Gets a value indicating whether indicate is set
- ///
- public bool IsIndicateSet
- {
- get
- {
- return _isIndicateSet;
- }
-
- private set
- {
- if (_isIndicateSet != value)
- {
- _isIndicateSet = value;
- OnPropertyChanged();
- }
- }
- }
-
- ///
- /// Gets a value indicating whether notify is set
- ///
- public bool IsNotifySet
- {
- get
- {
- return _isNotifySet;
- }
-
- private set
- {
- if (_isNotifySet != value)
- {
- _isNotifySet = value;
- OnPropertyChanged();
- }
- }
- }
-
- ///
- /// Gets or sets the parent service of this characteristic
- ///
- public ObservableGattDeviceService Parent
- {
- get
- {
- return _parent;
- }
-
- set
- {
- if (_parent != value)
- {
- _parent = value;
- OnPropertyChanged();
- }
- }
- }
-
- ///
- /// Gets or sets the name of this characteristic
- ///
- public string Name
- {
- get
- {
- return _name;
- }
-
- set
- {
- if (_name != value)
- {
- _name = value;
- OnPropertyChanged();
- }
- }
- }
-
- ///
- /// Gets or sets the UUID of this characteristic
- ///
- public string UUID
- {
- get
- {
- return _uuid;
- }
-
- set
- {
- if (_uuid != value)
- {
- _uuid = value;
- OnPropertyChanged();
- }
- }
- }
-
- ///
- /// Gets the value of this characteristic
- ///
- public string Value
- {
- get
- {
- return _value;
- }
-
- private set
- {
- if (_value != value)
- {
- _value = value;
- OnPropertyChanged();
- }
- }
- }
-
- ///
- /// Gets or sets how this characteristic's value should be displayed
- ///
- public DisplayTypes DisplayType
- {
- get
- {
- return _displayType;
- }
-
- set
- {
- if (_displayType != value)
- {
- _displayType = value;
- SetValue();
- OnPropertyChanged();
- }
- }
- }
-
- ///
- /// Event to notify when this object has changed
- ///
- public event PropertyChangedEventHandler PropertyChanged;
-
- ///
- /// Reads the value of the Characteristic
- ///
- /// A representing the asynchronous operation.
- public async Task ReadValueAsync()
- {
- var result = await Characteristic.ReadValueAsync(BluetoothCacheMode.Uncached);
-
- if (result.Status == GattCommunicationStatus.Success)
- {
- SetValue(result.Value);
- }
- else if (result.Status == GattCommunicationStatus.ProtocolError)
- {
- Value = result.ProtocolError.GetErrorString();
- }
- else
- {
- Value = "Unreachable";
- }
-
- return Value;
- }
-
- ///
- /// Set's the indicate descriptor
- ///
- /// Set indicate task
- public async Task SetIndicateAsync()
- {
- if (IsIndicateSet)
- {
- return IsIndicateSet;
- }
-
- var result = await
- Characteristic.WriteClientCharacteristicConfigurationDescriptorAsync(
- GattClientCharacteristicConfigurationDescriptorValue.Indicate);
-
- if (result == GattCommunicationStatus.Success)
- {
- IsIndicateSet = true;
- }
- else if (result == GattCommunicationStatus.ProtocolError)
- {
- IsIndicateSet = false;
- }
- else if (result == GattCommunicationStatus.Unreachable)
- {
- IsIndicateSet = false;
- }
-
- return IsIndicateSet;
- }
-
- ///
- /// Unset the indicate descriptor
- ///
- /// Unset indicate task
- public async Task StopIndicateAsync()
- {
- if (IsIndicateSet == false)
- {
- return !IsIndicateSet;
- }
-
- var result = await
- Characteristic.WriteClientCharacteristicConfigurationDescriptorAsync(
- GattClientCharacteristicConfigurationDescriptorValue.None);
-
- if (result == GattCommunicationStatus.Success)
- {
- IsIndicateSet = false;
- }
- else if (result == GattCommunicationStatus.ProtocolError)
- {
- IsIndicateSet = true;
- }
- else if (result == GattCommunicationStatus.Unreachable)
- {
- IsIndicateSet = true;
- }
-
- return !IsIndicateSet;
- }
-
- ///
- /// Sets the notify characteristic
- ///
- /// Set notify task
- public async Task SetNotifyAsync()
- {
- if (IsNotifySet)
- {
- return IsNotifySet;
- }
-
- var result = await
- Characteristic.WriteClientCharacteristicConfigurationDescriptorAsync(
- GattClientCharacteristicConfigurationDescriptorValue.Notify);
-
- if (result == GattCommunicationStatus.Success)
- {
- IsNotifySet = true;
- }
- else if (result == GattCommunicationStatus.ProtocolError)
- {
- IsNotifySet = false;
- }
- else if (result == GattCommunicationStatus.Unreachable)
- {
- IsNotifySet = false;
- }
-
- return IsNotifySet;
- }
-
- ///
- /// Unsets the notify descriptor
- ///
- /// Unset notify task
- public async Task StopNotifyAsync()
- {
- if (IsNotifySet == false)
- {
- return IsNotifySet;
- }
-
- var result = await
- Characteristic.WriteClientCharacteristicConfigurationDescriptorAsync(
- GattClientCharacteristicConfigurationDescriptorValue.None);
-
- if (result == GattCommunicationStatus.Success)
- {
- IsNotifySet = false;
- }
- else if (result == GattCommunicationStatus.ProtocolError)
- {
- IsNotifySet = true;
- }
- else if (result == GattCommunicationStatus.Unreachable)
- {
- IsNotifySet = true;
- }
-
- return !IsNotifySet;
- }
-
- ///
- /// Property changed event invoker
- ///
- /// name of the property that changed
- protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
- {
- PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
- }
-
- ///
- /// When the Characteristics value changes.
- ///
- /// The sender.
- /// The instance containing the event data.
- private async void Characteristic_ValueChanged(GattCharacteristic sender, GattValueChangedEventArgs args)
- {
- await DispatcherQueue.EnqueueAsync(() => { SetValue(args.CharacteristicValue); }, DispatcherQueuePriority.Normal);
- }
-
- ///
- /// helper function that copies the raw data into byte array
- ///
- /// The raw input buffer
- private void SetValue(IBuffer buffer)
- {
- _rawData = buffer;
- CryptographicBuffer.CopyToByteArray(_rawData, out _data);
-
- SetValue();
- }
-
- ///
- /// Sets the value of this characteristic based on the display type
- ///
- private void SetValue()
- {
- if (_data == null)
- {
- Value = "NULL";
- return;
- }
-
- GattPresentationFormat format = null;
-
- if (Characteristic.PresentationFormats.Any())
- {
- format = Characteristic.PresentationFormats[0];
- }
-
- // Determine what to set our DisplayType to
- if (format == null && DisplayType == DisplayTypes.NotSet)
- {
- if (Name == "DeviceName")
- {
- // All devices have DeviceName so this is a special case.
- DisplayType = DisplayTypes.Utf8;
- }
- else
- {
- var isString = true;
- var buffer = GattConvert.ToUTF8String(_rawData);
-
- // if buffer is only 1 char or 2 char with 0 at end then let's assume it's hex
- if (buffer.Length == 1)
- {
- isString = false;
- }
- else if (buffer.Length == 2 && buffer[1] == 0)
- {
- isString = false;
- }
- else
- {
- foreach (var b in buffer)
- {
- // if within the reasonable range of used characters and not null, let's assume it's a UTF8 string by default, else hex
- if ((b < ' ' || b > '~') && b != 0)
- {
- isString = false;
- break;
- }
- }
- }
-
- DisplayType = isString ? DisplayTypes.Utf8 : DisplayTypes.Hex;
- }
- }
- else if (format != null && DisplayType == DisplayTypes.NotSet)
- {
- if (format.FormatType == GattPresentationFormatTypes.Boolean ||
- format.FormatType == GattPresentationFormatTypes.Bit2 ||
- format.FormatType == GattPresentationFormatTypes.Nibble ||
- format.FormatType == GattPresentationFormatTypes.UInt8 ||
- format.FormatType == GattPresentationFormatTypes.UInt12 ||
- format.FormatType == GattPresentationFormatTypes.UInt16 ||
- format.FormatType == GattPresentationFormatTypes.UInt24 ||
- format.FormatType == GattPresentationFormatTypes.UInt32 ||
- format.FormatType == GattPresentationFormatTypes.UInt48 ||
- format.FormatType == GattPresentationFormatTypes.UInt64 ||
- format.FormatType == GattPresentationFormatTypes.SInt8 ||
- format.FormatType == GattPresentationFormatTypes.SInt12 ||
- format.FormatType == GattPresentationFormatTypes.SInt16 ||
- format.FormatType == GattPresentationFormatTypes.SInt24 ||
- format.FormatType == GattPresentationFormatTypes.SInt32)
- {
- DisplayType = DisplayTypes.Decimal;
- }
- else if (format.FormatType == GattPresentationFormatTypes.Utf8)
- {
- DisplayType = DisplayTypes.Utf8;
- }
- else if (format.FormatType == GattPresentationFormatTypes.Utf16)
- {
- DisplayType = DisplayTypes.Utf16;
- }
- else if (format.FormatType == GattPresentationFormatTypes.UInt128 ||
- format.FormatType == GattPresentationFormatTypes.SInt128 ||
- format.FormatType == GattPresentationFormatTypes.DUInt16 ||
- format.FormatType == GattPresentationFormatTypes.SInt64 ||
- format.FormatType == GattPresentationFormatTypes.Struct ||
- format.FormatType == GattPresentationFormatTypes.Float ||
- format.FormatType == GattPresentationFormatTypes.Float32 ||
- format.FormatType == GattPresentationFormatTypes.Float64)
- {
- DisplayType = DisplayTypes.Unsupported;
- }
- else
- {
- DisplayType = DisplayTypes.Unsupported;
- }
- }
-
- // Decode the value into the right display type
- if (DisplayType == DisplayTypes.Hex || DisplayType == DisplayTypes.Unsupported)
- {
- Value = GattConvert.ToHexString(_rawData);
- }
- else if (DisplayType == DisplayTypes.Decimal)
- {
- Value = GattConvert.ToInt32(_rawData).ToString();
- }
- else if (DisplayType == DisplayTypes.Utf8)
- {
- Value = GattConvert.ToUTF8String(_rawData);
- }
- else if (DisplayType == DisplayTypes.Utf16)
- {
- Value = GattConvert.ToUTF16String(_rawData);
- }
- }
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/ObservableGattDeviceService.cs b/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/ObservableGattDeviceService.cs
deleted file mode 100644
index 7ddd6543090..00000000000
--- a/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/ObservableGattDeviceService.cs
+++ /dev/null
@@ -1,174 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using System.Collections.ObjectModel;
-using System.ComponentModel;
-using System.Runtime.CompilerServices;
-using System.Threading;
-using System.Threading.Tasks;
-using Windows.Devices.Bluetooth;
-using Windows.Devices.Bluetooth.GenericAttributeProfile;
-
-namespace Microsoft.Toolkit.Uwp.Connectivity
-{
- ///
- /// Wrapper around to make it easier to use
- ///
- public class ObservableGattDeviceService : INotifyPropertyChanged
- {
- ///
- /// Source for
- ///
- private ObservableCollection _characteristics =
- new ObservableCollection();
-
- ///
- /// Source for
- ///
- private string _name;
-
- ///
- /// Source for
- ///
- private GattDeviceService _service;
-
- ///
- /// Source for
- ///
- private string _uuid;
-
- ///
- /// Initializes a new instance of the class.
- ///
- /// The service this class wraps
- public ObservableGattDeviceService(GattDeviceService service)
- {
- Service = service;
- Name = GattUuidsService.ConvertUuidToName(service.Uuid);
- UUID = Service.Uuid.ToString();
- _ = PopulateAllCharacteristicsAsync();
- }
-
- ///
- /// Gets the service this class wraps
- ///
- public GattDeviceService Service
- {
- get
- {
- return _service;
- }
-
- private set
- {
- if (_service != value)
- {
- _service = value;
- OnPropertyChanged();
- }
- }
- }
-
- ///
- /// Gets all the characteristics of this service
- ///
- /// The characteristics.
- public ObservableCollection Characteristics
- {
- get
- {
- return _characteristics;
- }
-
- private set
- {
- if (_characteristics != value)
- {
- _characteristics = value;
- OnPropertyChanged();
- }
- }
- }
-
- ///
- /// Gets the name of this service
- ///
- public string Name
- {
- get
- {
- return _name;
- }
-
- private set
- {
- if (_name != value)
- {
- _name = value;
- OnPropertyChanged();
- }
- }
- }
-
- ///
- /// Gets the UUID of this service
- ///
- public string UUID
- {
- get
- {
- return _uuid;
- }
-
- private set
- {
- if (_uuid != value)
- {
- _uuid = value;
- OnPropertyChanged();
- }
- }
- }
-
- ///
- /// Event to notify when this object has changed
- ///
- public event PropertyChangedEventHandler PropertyChanged;
-
- ///
- /// Property changed event invoker
- ///
- /// name of the property that changed
- protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
- {
- PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
- }
-
- ///
- /// Populate the characteristics in .
- ///
- /// The status of the communication with the GATT device.
- private async Task PopulateAllCharacteristicsAsync()
- {
- var tokenSource = new CancellationTokenSource(5000);
- var getCharacteristicsTask = await Task.Run(
- () => Service.GetCharacteristicsAsync(BluetoothCacheMode.Uncached),
- tokenSource.Token);
-
- GattCharacteristicsResult result = null;
- result = await getCharacteristicsTask;
-
- if (result.Status == GattCommunicationStatus.Success)
- {
- foreach (var gattCharacteristic in result.Characteristics)
- {
- Characteristics.Add(new ObservableGattCharacteristics(gattCharacteristic, this));
- }
- }
-
- return result.Status;
- }
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Connectivity/Microsoft.Toolkit.Uwp.Connectivity.csproj b/Microsoft.Toolkit.Uwp.Connectivity/Microsoft.Toolkit.Uwp.Connectivity.csproj
deleted file mode 100644
index 4cd3b1c28d4..00000000000
--- a/Microsoft.Toolkit.Uwp.Connectivity/Microsoft.Toolkit.Uwp.Connectivity.csproj
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
- uap10.0.17763
-
-
-
- Windows Community Toolkit - Devices
- This library enables easier consumption of connectivity Devices/Peripherals and handle its connection to Windows devices. It contains BluetoothLE and Network connectivity helpers.
- Devices;Bluetooth;LE;BluetoothLE;BLE;Networking
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Connectivity/Network/ConnectionInformation.cs b/Microsoft.Toolkit.Uwp.Connectivity/Network/ConnectionInformation.cs
deleted file mode 100644
index 2e89c465442..00000000000
--- a/Microsoft.Toolkit.Uwp.Connectivity/Network/ConnectionInformation.cs
+++ /dev/null
@@ -1,149 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Windows.Networking.Connectivity;
-
-namespace Microsoft.Toolkit.Uwp.Connectivity
-{
- ///
- /// This class exposes information about the network connectivity.
- ///
- public class ConnectionInformation
- {
- private readonly List networkNames = new List();
-
- ///
- /// Updates the current object based on profile passed.
- ///
- /// instance of
- public void UpdateConnectionInformation(ConnectionProfile profile)
- {
- if (profile == null)
- {
- Reset();
-
- return;
- }
-
- networkNames.Clear();
-
- uint ianaInterfaceType = profile.NetworkAdapter?.IanaInterfaceType ?? 0;
-
- switch (ianaInterfaceType)
- {
- case 6:
- ConnectionType = ConnectionType.Ethernet;
- break;
-
- case 71:
- ConnectionType = ConnectionType.WiFi;
- break;
-
- case 243:
- case 244:
- ConnectionType = ConnectionType.Data;
- break;
-
- default:
- ConnectionType = ConnectionType.Unknown;
- break;
- }
-
- var names = profile.GetNetworkNames();
- if (names?.Count > 0)
- {
- networkNames.AddRange(names);
- }
-
- ConnectivityLevel = profile.GetNetworkConnectivityLevel();
-
- switch (ConnectivityLevel)
- {
- case NetworkConnectivityLevel.None:
- case NetworkConnectivityLevel.LocalAccess:
- IsInternetAvailable = false;
- break;
-
- default:
- IsInternetAvailable = true;
- break;
- }
-
- ConnectionCost = profile.GetConnectionCost();
- SignalStrength = profile.GetSignalBars();
- }
-
- ///
- /// Resets the current object to default values.
- ///
- internal void Reset()
- {
- networkNames.Clear();
-
- ConnectionType = ConnectionType.Unknown;
- ConnectivityLevel = NetworkConnectivityLevel.None;
- IsInternetAvailable = false;
- ConnectionCost = null;
- SignalStrength = null;
- }
-
- ///
- /// Gets a value indicating whether if the current internet connection is metered.
- ///
- public bool IsInternetOnMeteredConnection
- {
- get
- {
- return ConnectionCost != null && ConnectionCost.NetworkCostType != NetworkCostType.Unrestricted;
- }
- }
-
- ///
- /// Gets a value indicating whether internet is available across all connections.
- ///
- /// True if internet can be reached.
- public bool IsInternetAvailable { get; private set; }
-
- ///
- /// Gets connection type for the current Internet Connection Profile.
- ///
- /// value of
- public ConnectionType ConnectionType { get; private set; }
-
- ///
- /// Gets connectivity level for the current Internet Connection Profile.
- ///
- /// value of
- public NetworkConnectivityLevel ConnectivityLevel { get; private set; }
-
- ///
- /// Gets connection cost for the current Internet Connection Profile.
- ///
- /// value of
- public ConnectionCost ConnectionCost { get; private set; }
-
- ///
- /// Gets signal strength for the current Internet Connection Profile.
- ///
- /// value of
- public byte? SignalStrength { get; private set; }
-
- ///
- /// Gets the network names associated with the current Internet Connection Profile.
- ///
- /// value of
- public IReadOnlyList NetworkNames
- {
- get
- {
- return networkNames.AsReadOnly();
- }
- }
- }
-}
diff --git a/Microsoft.Toolkit.Uwp.Connectivity/Network/ConnectionType.cs b/Microsoft.Toolkit.Uwp.Connectivity/Network/ConnectionType.cs
deleted file mode 100644
index 39a39aadde2..00000000000
--- a/Microsoft.Toolkit.Uwp.Connectivity/Network/ConnectionType.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-namespace Microsoft.Toolkit.Uwp.Connectivity
-{
- ///
- /// Enumeration denoting connection type.
- ///
- public enum ConnectionType
- {
- ///
- /// Connected to wired network
- ///
- Ethernet,
-
- ///
- /// Connected to wireless network
- ///
- WiFi,
-
- ///
- /// Connected to mobile data connection
- ///
- Data,
-
- ///
- /// Connection type not identified
- ///
- Unknown,
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Connectivity/Network/NetworkHelper.cs b/Microsoft.Toolkit.Uwp.Connectivity/Network/NetworkHelper.cs
deleted file mode 100644
index 42f4ca1c0e8..00000000000
--- a/Microsoft.Toolkit.Uwp.Connectivity/Network/NetworkHelper.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using Windows.Networking.Connectivity;
-
-namespace Microsoft.Toolkit.Uwp.Connectivity
-{
- ///
- /// This class exposes functionality of NetworkInformation through a singleton.
- ///
- public class NetworkHelper
- {
- ///
- /// Event raised when the network changes.
- ///
- public event EventHandler NetworkChanged;
-
- ///
- /// Initializes a new instance of the class.
- ///
- protected NetworkHelper()
- {
- ConnectionInformation = new ConnectionInformation();
-
- UpdateConnectionInformation();
-
- NetworkInformation.NetworkStatusChanged += OnNetworkStatusChanged;
- }
-
- ///
- /// Finalizes an instance of the class.
- ///
- ~NetworkHelper()
- {
- NetworkInformation.NetworkStatusChanged -= OnNetworkStatusChanged;
- }
-
- ///
- /// Gets public singleton property.
- ///
- public static NetworkHelper Instance { get; } = new NetworkHelper();
-
- ///
- /// Gets instance of .
- ///
- public ConnectionInformation ConnectionInformation { get; }
-
- ///
- /// Checks the current connection information and raises if needed.
- ///
- private void UpdateConnectionInformation()
- {
- lock (ConnectionInformation)
- {
- try
- {
- ConnectionInformation.UpdateConnectionInformation(NetworkInformation.GetInternetConnectionProfile());
-
- NetworkChanged?.Invoke(this, EventArgs.Empty);
- }
- catch
- {
- ConnectionInformation.Reset();
- }
- }
- }
-
- ///
- /// Invokes when the current network status changes.
- ///
- private void OnNetworkStatusChanged(object sender)
- {
- UpdateConnectionInformation();
- }
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Connectivity/Properties/Microsoft.Toolkit.Uwp.Connectivity.rd.xml b/Microsoft.Toolkit.Uwp.Connectivity/Properties/Microsoft.Toolkit.Uwp.Connectivity.rd.xml
deleted file mode 100644
index e537af7d785..00000000000
--- a/Microsoft.Toolkit.Uwp.Connectivity/Properties/Microsoft.Toolkit.Uwp.Connectivity.rd.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.DeveloperTools/AlignmentGrid/AlignmentGrid.cs b/Microsoft.Toolkit.Uwp.DeveloperTools/AlignmentGrid/AlignmentGrid.cs
deleted file mode 100644
index 2bd15eec6d4..00000000000
--- a/Microsoft.Toolkit.Uwp.DeveloperTools/AlignmentGrid/AlignmentGrid.cs
+++ /dev/null
@@ -1,129 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Controls;
-using Windows.UI.Xaml.Media;
-using Windows.UI.Xaml.Shapes;
-
-namespace Microsoft.Toolkit.Uwp.DeveloperTools
-{
- ///
- /// AlignmentGrid is used to display a grid to help aligning controls
- ///
- public partial class AlignmentGrid : ContentControl
- {
- ///
- /// Identifies the dependency property.
- ///
- public static readonly DependencyProperty LineBrushProperty = DependencyProperty.Register(nameof(LineBrush), typeof(Brush), typeof(AlignmentGrid), new PropertyMetadata(null, OnPropertyChanged));
-
- ///
- /// Identifies the dependency property.
- ///
- public static readonly DependencyProperty HorizontalStepProperty = DependencyProperty.Register(nameof(HorizontalStep), typeof(double), typeof(AlignmentGrid), new PropertyMetadata(20.0, OnPropertyChanged));
-
- ///
- /// Identifies the dependency property.
- ///
- public static readonly DependencyProperty VerticalStepProperty = DependencyProperty.Register(nameof(VerticalStep), typeof(double), typeof(AlignmentGrid), new PropertyMetadata(20.0, OnPropertyChanged));
-
- private static void OnPropertyChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs e)
- {
- var alignmentGrid = dependencyObject as AlignmentGrid;
-
- alignmentGrid?.Rebuild();
- }
-
- private readonly Canvas containerCanvas = new Canvas();
-
- ///
- /// Gets or sets the step to use horizontally.
- ///
- public Brush LineBrush
- {
- get { return (Brush)GetValue(LineBrushProperty); }
- set { SetValue(LineBrushProperty, value); }
- }
-
- ///
- /// Gets or sets the step to use horizontally.
- ///
- public double HorizontalStep
- {
- get { return (double)GetValue(HorizontalStepProperty); }
- set { SetValue(HorizontalStepProperty, value); }
- }
-
- ///
- /// Gets or sets the step to use horizontally.
- ///
- public double VerticalStep
- {
- get { return (double)GetValue(VerticalStepProperty); }
- set { SetValue(VerticalStepProperty, value); }
- }
-
- ///
- /// Initializes a new instance of the class.
- ///
- public AlignmentGrid()
- {
- SizeChanged += AlignmentGrid_SizeChanged;
-
- IsHitTestVisible = false;
- IsTabStop = false;
- Opacity = 0.5;
-
- HorizontalContentAlignment = HorizontalAlignment.Stretch;
- VerticalContentAlignment = VerticalAlignment.Stretch;
- Content = containerCanvas;
- }
-
- private void Rebuild()
- {
- containerCanvas.Children.Clear();
- var horizontalStep = HorizontalStep;
- var verticalStep = VerticalStep;
- var brush = LineBrush ?? (Brush)Application.Current.Resources["ApplicationForegroundThemeBrush"];
-
- if (horizontalStep > 0)
- {
- for (double x = 0; x < ActualWidth; x += horizontalStep)
- {
- var line = new Rectangle
- {
- Width = 1,
- Height = ActualHeight,
- Fill = brush
- };
- Canvas.SetLeft(line, x);
-
- containerCanvas.Children.Add(line);
- }
- }
-
- if (verticalStep > 0)
- {
- for (double y = 0; y < ActualHeight; y += verticalStep)
- {
- var line = new Rectangle
- {
- Width = ActualWidth,
- Height = 1,
- Fill = brush
- };
- Canvas.SetTop(line, y);
-
- containerCanvas.Children.Add(line);
- }
- }
- }
-
- private void AlignmentGrid_SizeChanged(object sender, SizeChangedEventArgs e)
- {
- Rebuild();
- }
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.DeveloperTools/FocusTracker/FocusTracker.cs b/Microsoft.Toolkit.Uwp.DeveloperTools/FocusTracker/FocusTracker.cs
deleted file mode 100644
index 29f36a3e197..00000000000
--- a/Microsoft.Toolkit.Uwp.DeveloperTools/FocusTracker/FocusTracker.cs
+++ /dev/null
@@ -1,165 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Windows.System;
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Automation;
-using Windows.UI.Xaml.Controls;
-using Windows.UI.Xaml.Controls.Primitives;
-using Windows.UI.Xaml.Input;
-using Windows.UI.Xaml.Media;
-using Windows.UI.Xaml.Shapes;
-
-namespace Microsoft.Toolkit.Uwp.DeveloperTools
-{
- ///
- /// FocusTracker can be used to display information about the current focused XAML element.
- ///
- [TemplatePart(Name = "ControlName", Type = typeof(TextBlock))]
- [TemplatePart(Name = "ControlType", Type = typeof(TextBlock))]
- [TemplatePart(Name = "ControlAutomationName", Type = typeof(TextBlock))]
- [TemplatePart(Name = "ControlFirstParentWithName", Type = typeof(TextBlock))]
- public partial class FocusTracker : Control
- {
- ///
- /// Defines the dependency property.
- ///
- public static readonly DependencyProperty IsActiveProperty = DependencyProperty.Register(nameof(IsActive), typeof(bool), typeof(FocusTracker), new PropertyMetadata(false, OnIsActiveChanged));
-
- private static void OnIsActiveChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
- {
- if (d is FocusTracker focusTracker)
- {
- if (e.NewValue != null && (bool)e.NewValue)
- {
- focusTracker.Start();
- }
- else
- {
- focusTracker.Stop();
- }
- }
- }
-
- private TextBlock controlName;
- private TextBlock controlType;
- private TextBlock controlAutomationName;
- private TextBlock controlFirstParentWithName;
-
- ///
- /// Gets or sets a value indicating whether the tracker is running or not.
- ///
- public bool IsActive
- {
- get { return (bool)GetValue(IsActiveProperty); }
- set { SetValue(IsActiveProperty, value); }
- }
-
- ///
- /// Initializes a new instance of the class.
- ///
- public FocusTracker()
- {
- DefaultStyleKey = typeof(FocusTracker);
- }
-
- ///
- /// Update the visual state of the control when its template is changed.
- ///
- protected override void OnApplyTemplate()
- {
- controlName = GetTemplateChild("ControlName") as TextBlock;
- controlType = GetTemplateChild("ControlType") as TextBlock;
- controlAutomationName = GetTemplateChild("ControlAutomationName") as TextBlock;
- controlFirstParentWithName = GetTemplateChild("ControlFirstParentWithName") as TextBlock;
- }
-
- private void Start()
- {
- // Get currently focused control once when we start
- if (Windows.Foundation.Metadata.ApiInformation.IsPropertyPresent("Windows.UI.Xaml.UIElement", "XamlRoot") && XamlRoot != null)
- {
- FocusOnControl(FocusManager.GetFocusedElement(XamlRoot) as FrameworkElement);
- }
- else
- {
- FocusOnControl(FocusManager.GetFocusedElement() as FrameworkElement);
- }
-
- // Then use FocusManager event from 1809 to listen to updates
- FocusManager.GotFocus += FocusManager_GotFocus;
- }
-
- private void Stop()
- {
- FocusManager.GotFocus -= FocusManager_GotFocus;
- ClearContent();
- }
-
- private void FocusManager_GotFocus(object sender, FocusManagerGotFocusEventArgs e)
- {
- FocusOnControl(e.NewFocusedElement as FrameworkElement);
- }
-
- private void ClearContent()
- {
- controlName.Text = string.Empty;
- controlType.Text = string.Empty;
- controlAutomationName.Text = string.Empty;
- controlFirstParentWithName.Text = string.Empty;
- }
-
- private void FocusOnControl(FrameworkElement focusedControl)
- {
- if (focusedControl == null)
- {
- ClearContent();
- return;
- }
-
- if (controlName != null)
- {
- controlName.Text = focusedControl.Name;
- }
-
- if (controlType != null)
- {
- controlType.Text = focusedControl.GetType().Name;
- }
-
- if (controlAutomationName != null)
- {
- controlAutomationName.Text = AutomationProperties.GetName(focusedControl);
- }
-
- if (controlFirstParentWithName != null)
- {
- var parentWithName = FindVisualAscendantWithName(focusedControl);
- controlFirstParentWithName.Text = parentWithName?.Name ?? string.Empty;
- }
- }
-
- private FrameworkElement FindVisualAscendantWithName(FrameworkElement element)
- {
- var parent = VisualTreeHelper.GetParent(element) as FrameworkElement;
-
- if (parent == null)
- {
- return null;
- }
-
- if (!string.IsNullOrEmpty(parent.Name))
- {
- return parent;
- }
-
- return FindVisualAscendantWithName(parent);
- }
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.DeveloperTools/FocusTracker/FocusTracker.xaml b/Microsoft.Toolkit.Uwp.DeveloperTools/FocusTracker/FocusTracker.xaml
deleted file mode 100644
index 5eaa0f345b8..00000000000
--- a/Microsoft.Toolkit.Uwp.DeveloperTools/FocusTracker/FocusTracker.xaml
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.DeveloperTools/Microsoft.Toolkit.Uwp.DeveloperTools.csproj b/Microsoft.Toolkit.Uwp.DeveloperTools/Microsoft.Toolkit.Uwp.DeveloperTools.csproj
deleted file mode 100644
index c5d5838785f..00000000000
--- a/Microsoft.Toolkit.Uwp.DeveloperTools/Microsoft.Toolkit.Uwp.DeveloperTools.csproj
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
- uap10.0.17763
-
-
-
- Windows Community Toolkit - Developer Tools
- This library provides XAML user controls and services to help developers build their app. It is a part of the Windows Community Toolkit.
-
- -AligmentGrid : Displays a Grid that helps align the controls.
- -FocusTrackerControl : The FocusTracker Control is a feature that can be used to display information about the current focused XAML element.
- -Themes : Provides the source path of the resource dictionaries for the FocusTracker.
-
- Controls;XAML;Developer;Tools;Accessibility;Alignment;Grid;AlignmentGrid
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.DeveloperTools/Properties/Microsoft.Toolkit.Uwp.DeveloperTools.rd.xml b/Microsoft.Toolkit.Uwp.DeveloperTools/Properties/Microsoft.Toolkit.Uwp.DeveloperTools.rd.xml
deleted file mode 100644
index 3e6944658b2..00000000000
--- a/Microsoft.Toolkit.Uwp.DeveloperTools/Properties/Microsoft.Toolkit.Uwp.DeveloperTools.rd.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.DeveloperTools/Themes/Generic.xaml b/Microsoft.Toolkit.Uwp.DeveloperTools/Themes/Generic.xaml
deleted file mode 100644
index a954b29ca40..00000000000
--- a/Microsoft.Toolkit.Uwp.DeveloperTools/Themes/Generic.xaml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.DeveloperTools/VisualStudioToolsManifest.xml b/Microsoft.Toolkit.Uwp.DeveloperTools/VisualStudioToolsManifest.xml
deleted file mode 100644
index 5b0b0159144..00000000000
--- a/Microsoft.Toolkit.Uwp.DeveloperTools/VisualStudioToolsManifest.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/ComboBoxItemGazeTargetItem.cs b/Microsoft.Toolkit.Uwp.Input.GazeInteraction/ComboBoxItemGazeTargetItem.cs
deleted file mode 100644
index 5305820bcf5..00000000000
--- a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/ComboBoxItemGazeTargetItem.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Automation.Peers;
-using Windows.UI.Xaml.Controls;
-
-namespace Microsoft.Toolkit.Uwp.Input.GazeInteraction
-{
- internal class ComboBoxItemGazeTargetItem : GazeTargetItem
- {
- internal ComboBoxItemGazeTargetItem(UIElement element)
- : base(element)
- {
- }
-
- internal override void Invoke()
- {
- var peer = FrameworkElementAutomationPeer.FromElement(TargetElement);
- var comboBoxItemAutomationPeer = peer as ComboBoxItemAutomationPeer;
- var comboBoxItem = (ComboBoxItem)comboBoxItemAutomationPeer.Owner;
-
- AutomationPeer ancestor = comboBoxItemAutomationPeer;
- var comboBoxAutomationPeer = ancestor as ComboBoxAutomationPeer;
- while (comboBoxAutomationPeer == null)
- {
- ancestor = ancestor.Navigate(AutomationNavigationDirection.Parent) as AutomationPeer;
- comboBoxAutomationPeer = ancestor as ComboBoxAutomationPeer;
- }
-
- comboBoxItem.IsSelected = true;
- comboBoxAutomationPeer.Collapse();
- }
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/DwellInvokedRoutedEventArgs.cs b/Microsoft.Toolkit.Uwp.Input.GazeInteraction/DwellInvokedRoutedEventArgs.cs
deleted file mode 100644
index fe953ca9eba..00000000000
--- a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/DwellInvokedRoutedEventArgs.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.ComponentModel;
-
-namespace Microsoft.Toolkit.Uwp.Input.GazeInteraction
-{
- ///
- /// This parameter is passed to the GazeElement::Invoked event and allows
- /// the application to prevent default invocation when the user dwells on a control
- ///
- public sealed class DwellInvokedRoutedEventArgs : HandledEventArgs
- {
- internal DwellInvokedRoutedEventArgs()
- {
- }
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/DwellProgressEventArgs.cs b/Microsoft.Toolkit.Uwp.Input.GazeInteraction/DwellProgressEventArgs.cs
deleted file mode 100644
index d7e1974a555..00000000000
--- a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/DwellProgressEventArgs.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using System.ComponentModel;
-
-namespace Microsoft.Toolkit.Uwp.Input.GazeInteraction
-{
- ///
- /// This parameter is passed to the GazeElement.DwellProgressFeedback event. The event is fired to inform the application of the user's progress towards completing dwelling on a control
- ///
- public sealed class DwellProgressEventArgs : HandledEventArgs
- {
- ///
- /// Gets an enum that reflects the current state of dwell progress
- ///
- public DwellProgressState State { get; }
-
- ///
- /// Gets a value between 0 and 1 that reflects the fraction of progress towards completing dwell
- ///
- public double Progress { get; }
-
- internal DwellProgressEventArgs(DwellProgressState state, TimeSpan elapsedDuration, TimeSpan triggerDuration)
- {
- State = state;
- Progress = ((double)elapsedDuration.Ticks) / triggerDuration.Ticks;
- }
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/DwellProgressState.cs b/Microsoft.Toolkit.Uwp.Input.GazeInteraction/DwellProgressState.cs
deleted file mode 100644
index 79c6275a23f..00000000000
--- a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/DwellProgressState.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-namespace Microsoft.Toolkit.Uwp.Input.GazeInteraction
-{
- ///
- /// An enum that reflects the current state of progress towards dwell when a user is focused on a control
- ///
- public enum DwellProgressState
- {
- ///
- /// User is not looking at the control
- ///
- Idle,
-
- ///
- /// Gaze has entered control but we're not yet showing progress.
- ///
- Fixating,
-
- ///
- /// User is continuing to focus on a control with an intent to dwell and invoke
- ///
- Progressing,
-
- ///
- /// User has completed dwelling on a control
- ///
- Complete
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/ExpandCollapsePatternGazeTargetItem.cs b/Microsoft.Toolkit.Uwp.Input.GazeInteraction/ExpandCollapsePatternGazeTargetItem.cs
deleted file mode 100644
index 1eba1e80605..00000000000
--- a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/ExpandCollapsePatternGazeTargetItem.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Automation;
-using Windows.UI.Xaml.Automation.Peers;
-using Windows.UI.Xaml.Automation.Provider;
-
-namespace Microsoft.Toolkit.Uwp.Input.GazeInteraction
-{
- internal class ExpandCollapsePatternGazeTargetItem : GazeTargetItem
- {
- internal ExpandCollapsePatternGazeTargetItem(UIElement element)
- : base(element)
- {
- }
-
- internal override void Invoke()
- {
- var peer = FrameworkElementAutomationPeer.FromElement(TargetElement);
- var provider = peer.GetPattern(PatternInterface.ExpandCollapse) as IExpandCollapseProvider;
- switch (provider.ExpandCollapseState)
- {
- case ExpandCollapseState.Collapsed:
- provider.Expand();
- break;
-
- case ExpandCollapseState.Expanded:
- provider.Collapse();
- break;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeCursor.cs b/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeCursor.cs
deleted file mode 100644
index d4e95c2f1f0..00000000000
--- a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeCursor.cs
+++ /dev/null
@@ -1,173 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.Linq;
-using Windows.Foundation;
-using Windows.Foundation.Collections;
-using Windows.UI;
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Controls.Primitives;
-using Windows.UI.Xaml.Media;
-
-namespace Microsoft.Toolkit.Uwp.Input.GazeInteraction
-{
- internal class GazeCursor
- {
- private const int DEFAULT_CURSOR_RADIUS = 5;
- private const bool DEFAULT_CURSOR_VISIBILITY = true;
-
- public void LoadSettings(ValueSet settings)
- {
- if (settings.ContainsKey("GazeCursor.CursorRadius"))
- {
- CursorRadius = (int)settings["GazeCursor.CursorRadius"];
- }
-
- if (settings.ContainsKey("GazeCursor.CursorVisibility"))
- {
- IsCursorVisible = (bool)settings["GazeCursor.CursorVisibility"];
- }
- }
-
- public int CursorRadius
- {
- get
- {
- return _cursorRadius;
- }
-
- set
- {
- _cursorRadius = value;
- var gazeCursor = CursorElement;
- if (gazeCursor != null)
- {
- gazeCursor.Width = 2 * _cursorRadius;
- gazeCursor.Height = 2 * _cursorRadius;
- gazeCursor.Margin = new Thickness(-_cursorRadius, -_cursorRadius, 0, 0);
- }
- }
- }
-
- public bool IsCursorVisible
- {
- get
- {
- return _isCursorVisible;
- }
-
- set
- {
- _isCursorVisible = value;
- SetVisibility();
- }
- }
-
- public bool IsGazeEntered
- {
- get
- {
- return _isGazeEntered;
- }
-
- set
- {
- _isGazeEntered = value;
- SetVisibility();
- }
- }
-
- public Point Position
- {
- get
- {
- return _cursorPosition;
- }
-
- set
- {
- _cursorPosition = value;
- _gazePopup.HorizontalOffset = value.X;
- _gazePopup.VerticalOffset = value.Y;
- SetVisibility();
- }
- }
-
- public UIElement PopupChild
- {
- get
- {
- return _gazePopup.Child;
- }
-
- set
- {
- _gazePopup.Child = value;
- }
- }
-
- public FrameworkElement CursorElement
- {
- get
- {
- return _gazePopup.Child as FrameworkElement;
- }
- }
-
- internal GazeCursor()
- {
- _gazePopup = new Popup
- {
- IsHitTestVisible = false
- };
-
- var gazeCursor = new Windows.UI.Xaml.Shapes.Ellipse
- {
- Fill = new SolidColorBrush(Colors.IndianRed),
- VerticalAlignment = VerticalAlignment.Top,
- HorizontalAlignment = HorizontalAlignment.Left,
- Width = 2 * CursorRadius,
- Height = 2 * CursorRadius,
- Margin = new Thickness(-CursorRadius, -CursorRadius, 0, 0),
- IsHitTestVisible = false
- };
-
- _gazePopup.Child = gazeCursor;
- }
-
- private void SetVisibility()
- {
- var isOpen = _isCursorVisible && _isGazeEntered;
- if (_gazePopup.IsOpen != isOpen)
- {
- _gazePopup.IsOpen = isOpen;
- }
- else if (isOpen)
- {
- Popup topmost;
-
- if (Windows.Foundation.Metadata.ApiInformation.IsPropertyPresent("Windows.UI.Xaml.UIElement", "XamlRoot") && _gazePopup.XamlRoot != null)
- {
- topmost = VisualTreeHelper.GetOpenPopupsForXamlRoot(_gazePopup.XamlRoot).First();
- }
- else
- {
- topmost = VisualTreeHelper.GetOpenPopups(Window.Current).First();
- }
-
- if (_gazePopup != topmost)
- {
- _gazePopup.IsOpen = false;
- _gazePopup.IsOpen = true;
- }
- }
- }
-
- private readonly Popup _gazePopup;
- private Point _cursorPosition = default;
- private int _cursorRadius = DEFAULT_CURSOR_RADIUS;
- private bool _isCursorVisible = DEFAULT_CURSOR_VISIBILITY;
- private bool _isGazeEntered;
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeElement.cs b/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeElement.cs
deleted file mode 100644
index 44a68306589..00000000000
--- a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeElement.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using Windows.UI.Xaml;
-
-namespace Microsoft.Toolkit.Uwp.Input.GazeInteraction
-{
- ///
- /// Surrogate object attached to controls allowing subscription to per-control gaze events.
- ///
- public class GazeElement : DependencyObject
- {
- ///
- /// This event is fired when the state of the user's gaze on a control has changed
- ///
- public event EventHandler StateChanged;
-
- ///
- /// This event is fired when the user completed dwelling on a control and the control is about to be invoked by default. This event is fired to give the application an opportunity to prevent default invocation
- ///
- public event EventHandler Invoked;
-
- ///
- /// This event is fired to inform the application of the progress towards dwell
- ///
- public event EventHandler DwellProgressFeedback;
-
- internal void RaiseStateChanged(object sender, StateChangedEventArgs args)
- {
- StateChanged?.Invoke(sender, args);
- }
-
- internal void RaiseInvoked(object sender, DwellInvokedRoutedEventArgs args)
- {
- Invoked?.Invoke(sender, args);
- }
-
- internal bool RaiseProgressFeedback(object sender, DwellProgressState state, TimeSpan elapsedTime, TimeSpan triggerTime)
- {
- var args = new DwellProgressEventArgs(state, elapsedTime, triggerTime);
- DwellProgressFeedback?.Invoke(sender, args);
- return args.Handled;
- }
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeEventArgs.cs b/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeEventArgs.cs
deleted file mode 100644
index c25c320e427..00000000000
--- a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeEventArgs.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using System.ComponentModel;
-using Windows.Foundation;
-
-namespace Microsoft.Toolkit.Uwp.Input.GazeInteraction
-{
- ///
- /// EventArgs used to send Gaze events. See
- ///
- public sealed class GazeEventArgs : HandledEventArgs
- {
- ///
- /// Gets the location of the Gaze event
- ///
- public Point Location { get; private set; }
-
- ///
- /// Gets the timestamp of the gaze event
- ///
- public TimeSpan Timestamp { get; private set; }
-
- internal void Set(Point location, TimeSpan timestamp)
- {
- Handled = false;
- Location = location;
- Timestamp = timestamp;
- }
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeFeedbackPopupFactory.cs b/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeFeedbackPopupFactory.cs
deleted file mode 100644
index 6249069b960..00000000000
--- a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeFeedbackPopupFactory.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.Collections.Generic;
-using Windows.UI.Xaml.Controls.Primitives;
-
-namespace Microsoft.Toolkit.Uwp.Input.GazeInteraction
-{
- internal class GazeFeedbackPopupFactory
- {
- private readonly List _cache = new List();
-
- public Popup Get()
- {
- Popup popup;
- Windows.UI.Xaml.Shapes.Rectangle rectangle;
-
- if (_cache.Count != 0)
- {
- popup = _cache[0];
- _cache.RemoveAt(0);
-
- rectangle = popup.Child as Windows.UI.Xaml.Shapes.Rectangle;
- }
- else
- {
- popup = new Popup();
-
- rectangle = new Windows.UI.Xaml.Shapes.Rectangle
- {
- IsHitTestVisible = false
- };
-
- popup.Child = rectangle;
- }
-
- rectangle.StrokeThickness = GazeInput.DwellStrokeThickness;
-
- return popup;
- }
-
- public void Return(Popup popup)
- {
- popup.IsOpen = false;
- _cache.Add(popup);
- }
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeFilterArgs.cs b/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeFilterArgs.cs
deleted file mode 100644
index a2f12005bce..00000000000
--- a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeFilterArgs.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using Windows.Foundation;
-
-namespace Microsoft.Toolkit.Uwp.Input.GazeInteraction
-{
- ///
- /// This struct encapsulates the location and timestamp associated with the user's gaze
- /// and is used as an input and output parameter for the IGazeFilter.Update method
- ///
- internal struct GazeFilterArgs
- {
- ///
- /// Gets the current point in the gaze stream
- ///
- public Point Location => _location;
-
- ///
- /// Gets the timestamp associated with the current point
- ///
- public TimeSpan Timestamp => _timestamp;
-
- internal GazeFilterArgs(Point location, TimeSpan timestamp)
- {
- _location = location;
- _timestamp = timestamp;
- }
-
- private Point _location;
- private TimeSpan _timestamp;
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeHidParsers/GazeHidParsersHelpers.cs b/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeHidParsers/GazeHidParsersHelpers.cs
deleted file mode 100644
index 1600d9631cb..00000000000
--- a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeHidParsers/GazeHidParsersHelpers.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using Windows.Devices.HumanInterfaceDevice;
-using Windows.Devices.Input.Preview;
-
-namespace Microsoft.Toolkit.Uwp.Input.GazeInteraction.GazeHidParsers
-{
- internal static class GazeHidParsersHelpers
- {
- public static HidNumericControlDescription GetGazeUsageFromCollectionId(
- GazeDevicePreview gazeDevice,
- ushort childUsageId,
- ushort parentUsageId)
- {
- var numericControls = gazeDevice.GetNumericControlDescriptions(
- (ushort)GazeHidUsages.UsagePage_EyeHeadTracker, childUsageId);
-
- for (int i = 0; i < numericControls.Count; i++)
- {
- var parentCollections = numericControls[i].ParentCollections;
- if (parentCollections.Count > 0 &&
- parentCollections[0].UsagePage == (ushort)GazeHidUsages.UsagePage_EyeHeadTracker &&
- parentCollections[0].UsageId == parentUsageId)
- {
- return numericControls[i];
- }
- }
-
- return null;
- }
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeHidParsers/GazeHidPosition.cs b/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeHidParsers/GazeHidPosition.cs
deleted file mode 100644
index dfcf3a6c05c..00000000000
--- a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeHidParsers/GazeHidPosition.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-namespace Microsoft.Toolkit.Uwp.Input.GazeInteraction.GazeHidParsers
-{
- ///
- /// Represents one Hid position
- ///
- public class GazeHidPosition
- {
- ///
- /// Gets or sets the X axis of this position
- ///
- public long X { get; set; }
-
- ///
- /// Gets or sets the Y axis of this position
- ///
- public long Y { get; set; }
-
- ///
- /// Gets or sets the Z axis of this position
- ///
- public long Z { get; set; }
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeHidParsers/GazeHidPositionParser.cs b/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeHidParsers/GazeHidPositionParser.cs
deleted file mode 100644
index 973ba90a088..00000000000
--- a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeHidParsers/GazeHidPositionParser.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using Windows.Devices.HumanInterfaceDevice;
-using Windows.Devices.Input.Preview;
-
-namespace Microsoft.Toolkit.Uwp.Input.GazeInteraction.GazeHidParsers
-{
- ///
- /// Hid Position Parser
- ///
- public class GazeHidPositionParser
- {
- ///
- /// Initializes a new instance of the class.
- ///
- /// used to parse.
- /// The used to parse.
- public GazeHidPositionParser(GazeDevicePreview gazeDevice, ushort usage)
- {
- _usage = usage;
-
- // Find all the position usages from the device's
- // descriptor and store them for easy access
- _x = GazeHidParsersHelpers.GetGazeUsageFromCollectionId(gazeDevice, (ushort)GazeHidUsages.Usage_PositionX, _usage);
- _y = GazeHidParsersHelpers.GetGazeUsageFromCollectionId(gazeDevice, (ushort)GazeHidUsages.Usage_PositionY, _usage);
- _z = GazeHidParsersHelpers.GetGazeUsageFromCollectionId(gazeDevice, (ushort)GazeHidUsages.Usage_PositionZ, _usage);
- }
-
- ///
- /// Parses the position from the report.
- ///
- /// A object used on the parsing.
- /// The parsed from the report.
- public GazeHidPosition GetPosition(HidInputReport report)
- {
- GazeHidPosition result = null;
-
- if (_x != null &&
- _y != null &&
- _z != null &&
- _usage != 0x0000)
- {
- var descX = report.GetNumericControlByDescription(_x);
- var descY = report.GetNumericControlByDescription(_y);
- var descZ = report.GetNumericControlByDescription(_z);
-
- var controlDescX = descX.ControlDescription;
- var controlDescY = descY.ControlDescription;
- var controlDescZ = descZ.ControlDescription;
-
- if ((controlDescX.LogicalMaximum < descX.ScaledValue || controlDescX.LogicalMinimum > descX.ScaledValue) ||
- (controlDescY.LogicalMaximum < descY.ScaledValue || controlDescY.LogicalMinimum > descY.ScaledValue) ||
- (controlDescZ.LogicalMaximum < descZ.ScaledValue || controlDescZ.LogicalMinimum > descZ.ScaledValue))
- {
- // One of the values is outside of the valid range.
- }
- else
- {
- result = new GazeHidPosition
- {
- X = descX.ScaledValue,
- Y = descY.ScaledValue,
- Z = descZ.ScaledValue
- };
- }
- }
-
- return result;
- }
-
- private readonly HidNumericControlDescription _x = null;
- private readonly HidNumericControlDescription _y = null;
- private readonly HidNumericControlDescription _z = null;
- private readonly ushort _usage = 0x0000;
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeHidParsers/GazeHidPositions.cs b/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeHidParsers/GazeHidPositions.cs
deleted file mode 100644
index 0a964501b60..00000000000
--- a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeHidParsers/GazeHidPositions.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-namespace Microsoft.Toolkit.Uwp.Input.GazeInteraction.GazeHidParsers
-{
- ///
- /// Represents the Hid positions
- ///
- public class GazeHidPositions
- {
- ///
- /// Gets or sets the left eye position
- ///
- public GazeHidPosition LeftEyePosition { get; set; }
-
- ///
- /// Gets or sets the right eye position
- ///
- public GazeHidPosition RightEyePosition { get; set; }
-
- ///
- /// Gets or sets the head position
- ///
- public GazeHidPosition HeadPosition { get; set; }
-
- ///
- /// Gets or sets the head rotation
- ///
- public GazeHidPosition HeadRotation { get; set; }
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeHidParsers/GazeHidPositionsParser.cs b/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeHidParsers/GazeHidPositionsParser.cs
deleted file mode 100644
index 3966b6fb072..00000000000
--- a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeHidParsers/GazeHidPositionsParser.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using Windows.Devices.HumanInterfaceDevice;
-using Windows.Devices.Input.Preview;
-
-namespace Microsoft.Toolkit.Uwp.Input.GazeInteraction.GazeHidParsers
-{
- ///
- /// Hid Positions Parser
- ///
- public class GazeHidPositionsParser
- {
- ///
- /// Initializes a new instance of the class.
- ///
- /// used to parse.
- public GazeHidPositionsParser(GazeDevicePreview gazeDevice)
- {
- _leftEyePositionParser = new GazeHidPositionParser(gazeDevice, (ushort)GazeHidUsages.Usage_LeftEyePosition);
- _rightEyePositionParser = new GazeHidPositionParser(gazeDevice, (ushort)GazeHidUsages.Usage_RightEyePosition);
- _headPositionParser = new GazeHidPositionParser(gazeDevice, (ushort)GazeHidUsages.Usage_HeadPosition);
- _headRotationParser = new GazeHidRotationParser(gazeDevice, (ushort)GazeHidUsages.Usage_HeadDirectionPoint);
- }
-
- ///
- /// Parses the positions from the report.
- ///
- /// A object used on the parsing.
- /// The parsed from the report.
- public GazeHidPositions GetGazeHidPositions(HidInputReport report)
- {
- return new GazeHidPositions
- {
- LeftEyePosition = this._leftEyePositionParser.GetPosition(report),
- RightEyePosition = this._rightEyePositionParser.GetPosition(report),
- HeadPosition = this._headPositionParser.GetPosition(report),
- HeadRotation = this._headRotationParser.GetRotation(report)
- };
- }
-
- private readonly GazeHidPositionParser _leftEyePositionParser;
- private readonly GazeHidPositionParser _rightEyePositionParser;
- private readonly GazeHidPositionParser _headPositionParser;
- private readonly GazeHidRotationParser _headRotationParser;
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeHidParsers/GazeHidRotationParser.cs b/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeHidParsers/GazeHidRotationParser.cs
deleted file mode 100644
index 3a9c075ba4c..00000000000
--- a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeHidParsers/GazeHidRotationParser.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using Windows.Devices.HumanInterfaceDevice;
-using Windows.Devices.Input.Preview;
-
-namespace Microsoft.Toolkit.Uwp.Input.GazeInteraction.GazeHidParsers
-{
- ///
- /// Hid Rotation Parser
- ///
- public class GazeHidRotationParser
- {
- ///
- /// Initializes a new instance of the class.
- ///
- /// used to parse.
- /// The used to parse.
- public GazeHidRotationParser(GazeDevicePreview gazeDevice, ushort usage)
- {
- _usage = usage;
-
- // Find all the rotation usages from the device's
- // descriptor and store them for easy access
- _x = GazeHidParsersHelpers.GetGazeUsageFromCollectionId(gazeDevice, (ushort)GazeHidUsages.Usage_RotationX, _usage);
- _y = GazeHidParsersHelpers.GetGazeUsageFromCollectionId(gazeDevice, (ushort)GazeHidUsages.Usage_RotationY, _usage);
- _z = GazeHidParsersHelpers.GetGazeUsageFromCollectionId(gazeDevice, (ushort)GazeHidUsages.Usage_RotationZ, _usage);
- }
-
- ///
- /// Parses the rotation from the report.
- ///
- /// A object used on the parsing.
- /// The parsed from the report.
- public GazeHidPosition GetRotation(HidInputReport report)
- {
- GazeHidPosition result = null;
-
- if (_x != null &&
- _y != null &&
- _z != null &&
- _usage != 0x0000)
- {
- var descX = report.GetNumericControlByDescription(_x);
- var descY = report.GetNumericControlByDescription(_y);
- var descZ = report.GetNumericControlByDescription(_z);
-
- var controlDescX = descX.ControlDescription;
- var controlDescY = descY.ControlDescription;
- var controlDescZ = descZ.ControlDescription;
-
- if ((controlDescX.LogicalMaximum < descX.ScaledValue || controlDescX.LogicalMinimum > descX.ScaledValue) ||
- (controlDescY.LogicalMaximum < descY.ScaledValue || controlDescY.LogicalMinimum > descY.ScaledValue) ||
- (controlDescZ.LogicalMaximum < descZ.ScaledValue || controlDescZ.LogicalMinimum > descZ.ScaledValue))
- {
- // One of the values is outside of the valid range.
- }
- else
- {
- result = new GazeHidPosition
- {
- X = descX.ScaledValue,
- Y = descY.ScaledValue,
- Z = descZ.ScaledValue
- };
- }
- }
-
- return result;
- }
-
- private readonly HidNumericControlDescription _x = null;
- private readonly HidNumericControlDescription _y = null;
- private readonly HidNumericControlDescription _z = null;
- private readonly ushort _usage = 0x0000;
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeHidUsages.cs b/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeHidUsages.cs
deleted file mode 100644
index f7d58bcf339..00000000000
--- a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeHidUsages.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-namespace Microsoft.Toolkit.Uwp.Input.GazeInteraction
-{
- ///
- /// This enum specifies the various HID usages specified by the EyeHeadTracker HID specification
- ///
- /// https://www.usb.org/sites/default/files/hutrr74_-_usage_page_for_head_and_eye_trackers_0.pdf
- ///
- public enum GazeHidUsages
- {
-#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
- UsagePage_EyeHeadTracker = 0x0012,
- Usage_EyeTracker = 0x0001,
- Usage_HeadTracker = 0x0002,
-
- // 0x0003-0x000F RESERVED
- Usage_TrackingData = 0x0010,
- Usage_Capabilities = 0x0011,
- Usage_Configuration = 0x0012,
- Usage_Status = 0x0013,
- Usage_Control = 0x0014,
-
- // 0x0015-0x001F RESERVED
- Usage_Timestamp = 0x0020,
- Usage_PositionX = 0x0021,
- Usage_PositionY = 0x0022,
- Usage_PositionZ = 0x0023,
- Usage_GazePoint = 0x0024,
- Usage_LeftEyePosition = 0x0025,
- Usage_RightEyePosition = 0x0026,
- Usage_HeadPosition = 0x0027,
- Usage_HeadDirectionPoint = 0x0028,
- Usage_RotationX = 0x0029,
- Usage_RotationY = 0x002A,
- Usage_RotationZ = 0x002B,
-
- // 0x002C-0x00FF RESERVED
- Usage_TrackerQuality = 0x0100,
- Usage_MinimumTrackingDistance = 0x0101,
- Usage_OptimumTrackingDistance = 0x0102,
- Usage_MaximumTrackingDistance = 0x0103,
- Usage_MaximumScreenPlaneWidth = 0x0104,
- Usage_MaximumScreenPlaneHeight = 0x0105,
-
- // 0x0106-0x01FF RESERVED
- Usage_DisplayManufacturerId = 0x0200,
- Usage_DisplayProductId = 0x0201,
- Usage_DisplaySerialNumber = 0x0202,
- Usage_DisplayManufacturerDate = 0x0203,
- Usage_CalibratedScreenWidth = 0x0204,
- Usage_CalibratedScreenHeight = 0x0205,
-
- // 0x0206-0x02FF RESERVED
- Usage_SamplingFrequency = 0x0300,
- Usage_ConfigurationStatus = 0x0301,
-
- // 0x0302-0x03FF RESERVED
- Usage_DeviceModeRequest = 0x0400,
-
- // 0x0401-0xFFFF RESERVED
-#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeHistoryItem.cs b/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeHistoryItem.cs
deleted file mode 100644
index 4dfe51ba96c..00000000000
--- a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeHistoryItem.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-
-namespace Microsoft.Toolkit.Uwp.Input.GazeInteraction
-{
- internal struct GazeHistoryItem
- {
- public GazeTargetItem HitTarget { get; set; }
-
- public TimeSpan Timestamp { get; set; }
-
- public TimeSpan Duration { get; set; }
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeInput.cs b/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeInput.cs
deleted file mode 100644
index 2991c100256..00000000000
--- a/Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeInput.cs
+++ /dev/null
@@ -1,432 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using Windows.Foundation.Collections;
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Controls;
-using Windows.UI.Xaml.Media;
-
-namespace Microsoft.Toolkit.Uwp.Input.GazeInteraction
-{
- ///
- /// Static class primarily providing access to attached properties controlling gaze behavior.
- ///
- [Windows.Foundation.Metadata.WebHostHidden]
- public class GazeInput
- {
- internal static readonly TimeSpan UnsetTimeSpan = new TimeSpan(-1);
-
- ///
- /// Gets the Interaction dependency property
- ///
- public static DependencyProperty InteractionProperty { get; } = DependencyProperty.RegisterAttached("Interaction", typeof(Interaction), typeof(GazeInput), new PropertyMetadata(Interaction.Inherited, new PropertyChangedCallback(OnInteractionChanged)));
-
- private static void OnInteractionChanged(DependencyObject ob, DependencyPropertyChangedEventArgs args)
- {
- var element = ob as FrameworkElement;
- var interaction = (Interaction)args.NewValue;
- GazePointerProxy.SetInteraction(element, interaction);
- }
-
- ///
- /// Gets the IsCursorVisible dependency property
- ///
- public static DependencyProperty IsCursorVisibleProperty { get; } = DependencyProperty.RegisterAttached("IsCursorVisible", typeof(bool), typeof(GazeInput), new PropertyMetadata(true, new PropertyChangedCallback(OnIsCursorVisibleChanged)));
-
- private static void OnIsCursorVisibleChanged(DependencyObject ob, DependencyPropertyChangedEventArgs args)
- {
- GazePointer.Instance.IsCursorVisible = (bool)args.NewValue;
- }
-
- ///
- /// Gets the CursorRadius dependency property
- ///
- public static DependencyProperty CursorRadiusProperty { get; } = DependencyProperty.RegisterAttached("CursorRadius", typeof(int), typeof(GazeInput), new PropertyMetadata(6, new PropertyChangedCallback(OnCursorRadiusChanged)));
-
- private static void OnCursorRadiusChanged(DependencyObject ob, DependencyPropertyChangedEventArgs args)
- {
- GazePointer.Instance.CursorRadius = (int)args.NewValue;
- }
-
- ///
- /// Gets the GazeElement dependency property
- ///
- public static DependencyProperty GazeElementProperty { get; } = DependencyProperty.RegisterAttached("GazeElement", typeof(GazeElement), typeof(GazeInput), new PropertyMetadata(null));
-
- ///
- /// Gets the FixationDuration dependency property
- ///
- public static DependencyProperty FixationDurationProperty { get; } = DependencyProperty.RegisterAttached("FixationDuration", typeof(TimeSpan), typeof(GazeInput), new PropertyMetadata(UnsetTimeSpan));
-
- ///
- /// Gets the DwellDuration dependency property
- ///
- public static DependencyProperty DwellDurationProperty { get; } = DependencyProperty.RegisterAttached("DwellDuration", typeof(TimeSpan), typeof(GazeInput), new PropertyMetadata(UnsetTimeSpan));
-
- ///
- /// Gets the RepeatDelayDuration dependency property
- ///
- public static DependencyProperty RepeatDelayDurationProperty { get; } = DependencyProperty.RegisterAttached("RepeatDelayDuration", typeof(TimeSpan), typeof(GazeInput), new PropertyMetadata(UnsetTimeSpan));
-
- ///
- /// Gets the DwellRepeatDuration dependency property
- ///
- public static DependencyProperty DwellRepeatDurationProperty { get; } = DependencyProperty.RegisterAttached("DwellRepeatDuration", typeof(TimeSpan), typeof(GazeInput), new PropertyMetadata(UnsetTimeSpan));
-
- ///
- /// Gets the ThresholdDuration dependency property
- ///
- public static DependencyProperty ThresholdDurationProperty { get; } = DependencyProperty.RegisterAttached("ThresholdDuration", typeof(TimeSpan), typeof(GazeInput), new PropertyMetadata(UnsetTimeSpan));
-
- ///
- /// Gets the MaxDwellRepeatCount dependency property
- ///
- public static DependencyProperty MaxDwellRepeatCountProperty { get; } = DependencyProperty.RegisterAttached("MaxDwellRepeatCount", typeof(int), typeof(GazeInput), new PropertyMetadata(0));
-
- ///
- /// Gets the IsSwitchEnabled dependency property
- ///
- public static DependencyProperty IsSwitchEnabledProperty { get; } = DependencyProperty.RegisterAttached("IsSwitchEnabled", typeof(bool), typeof(GazeInput), new PropertyMetadata(false, new PropertyChangedCallback(OnIsSwitchEnabledChanged)));
-
- private static void OnIsSwitchEnabledChanged(DependencyObject ob, DependencyPropertyChangedEventArgs args)
- {
- GazePointer.Instance.IsSwitchEnabled = (bool)args.NewValue;
- }
-
- ///
- /// Gets or sets the brush to use when displaying the default indication that gaze entered a control
- ///
- public static Brush DwellFeedbackEnterBrush
- {
- get
- {
- return GazePointer.Instance.EnterBrush;
- }
-
- set
- {
- GazePointer.Instance.EnterBrush = value;
- }
- }
-
- ///
- /// Gets or sets the brush to use when displaying the default animation for dwell press
- ///
- public static Brush DwellFeedbackProgressBrush
- {
- get
- {
- return GazePointer.Instance.ProgressBrush;
- }
-
- set
- {
- GazePointer.Instance.ProgressBrush = value;
- }
- }
-
- ///
- /// Gets or sets the brush to use when displaying the default animation for dwell complete
- ///
- public static Brush DwellFeedbackCompleteBrush
- {
- get
- {
- return GazePointer.Instance.CompleteBrush;
- }
-
- set
- {
- GazePointer.Instance.CompleteBrush = value;
- }
- }
-
- ///
- /// Gets or sets the thickness of the lines animated for dwell.
- ///
- public static double DwellStrokeThickness
- {
- get
- {
- return GazePointer.Instance.DwellStrokeThickness;
- }
-
- set
- {
- GazePointer.Instance.DwellStrokeThickness = value;
- }
- }
-
- ///
- /// Gets or sets the interaction default
- ///
- public static Interaction Interaction
- {
- get
- {
- return GazePointer.Instance.Interaction;
- }
-
- set
- {
- if (GazePointer.Instance.Interaction != value)
- {
- if (value == Interaction.Enabled)
- {
- GazePointer.Instance.AddRoot(0);
- }
- else if (GazePointer.Instance.Interaction == Interaction.Enabled)
- {
- GazePointer.Instance.RemoveRoot(0);
- }
-
- GazePointer.Instance.Interaction = value;
- }
- }
- }
-
- ///
- /// Gets the status of gaze interaction over that particular XAML element.
- ///
- /// The status of gaze interaction over that particular XAML element.
- public static Interaction GetInteraction(UIElement element)
- {
- return (Interaction)element.GetValue(InteractionProperty);
- }
-
- ///
- /// Gets a boolean indicating whether cursor is shown while user is looking at the school.
- ///
- /// True the cursor is shown while user is looking at the school; otherwise, false.
- public static bool GetIsCursorVisible(UIElement element)
- {
- return (bool)element.GetValue(IsCursorVisibleProperty);
- }
-
- ///
- /// Gets the size of the gaze cursor radius.
- ///
- /// The size of the gaze cursor radius.
- public static int GetCursorRadius(UIElement element)
- {
- return (int)element.GetValue(CursorRadiusProperty);
- }
-
- ///
- /// Gets the GazeElement associated with an UIElement.
- ///
- /// The GazeElement associated with an UIElement.
- public static GazeElement GetGazeElement(UIElement element)
- {
- return (GazeElement)element.GetValue(GazeElementProperty);
- }
-
- ///
- /// Gets the duration for the control to transition from the Enter state to the Fixation state. At this point, a StateChanged event is fired with PointerState set to Fixation. This event should be used to control the earliest visual feedback the application needs to provide to the user about the gaze location. The default is 350ms.
- ///
- /// Duration for the control to transition from the Enter state to the Fixation state.
- public static TimeSpan GetFixationDuration(UIElement element)
- {
- return (TimeSpan)element.GetValue(FixationDurationProperty);
- }
-
- ///
- /// Gets the duration for the control to transition from the Fixation state to the Dwell state. At this point, a StateChanged event is fired with PointerState set to Dwell. The Enter and Fixation states are typically achieved too rapidly for the user to have much control over. In contrast Dwell is conscious event. This is the point at which the control is invoked, e.g. a button click. The application can modify this property to control when a gaze enabled UI element gets invoked after a user starts looking at it.
- ///
- /// The duration for the control to transition from the Fixation state to the Dwell state.
- public static TimeSpan GetDwellDuration(UIElement element)
- {
- return (TimeSpan)element.GetValue(DwellDurationProperty);
- }
-
- ///
- /// Gets the additional duration for the first repeat to occur. This prevents inadvertent repeated invocation.
- ///
- /// The additional duration for the first repeat to occur.
- public static TimeSpan GetRepeatDelayDuration(UIElement element)
- {
- return (TimeSpan)element.GetValue(RepeatDelayDurationProperty);
- }
-
- ///
- /// Gets the duration of repeated dwell invocations, should the user continue to dwell on the control. The first repeat will occur after an additional delay specified by RepeatDelayDuration. Subsequent repeats happen after every period of DwellRepeatDuration. A control is invoked repeatedly only if MaxDwellRepeatCount is set to greater than zero.
- ///
- /// The duration of repeated dwell invocations.
- public static TimeSpan GetDwellRepeatDuration(UIElement element)
- {
- return (TimeSpan)element.GetValue(DwellRepeatDurationProperty);
- }
-
- ///
- /// Gets the duration that controls when the PointerState moves to either the Enter state or the Exit state. When this duration has elapsed after the user's gaze first enters a control, the PointerState is set to Enter. And when this duration has elapsed after the user's gaze has left the control, the PointerState is set to Exit. In both cases, a StateChanged event is fired. The default is 50ms.
- ///
- /// The duration that controls when the PointerState moves to either the Enter state or the Exit state.
- public static TimeSpan GetThresholdDuration(UIElement element)
- {
- return (TimeSpan)element.GetValue(ThresholdDurationProperty);
- }
-
- ///
- /// Gets the maximum times the control will invoked repeatedly without the user's gaze having to leave and re-enter the control. The default value is zero which disables repeated invocation of a control. Developers can set a higher value to enable repeated invocation.
- ///
- /// The maximum times the control will invoked repeatedly without the user's gaze having to leave and re-enter the control.
- public static int GetMaxDwellRepeatCount(UIElement element)
- {
- return (int)element.GetValue(MaxDwellRepeatCountProperty);
- }
-
- ///
- /// Gets a boolean indicating whether gaze plus switch is enabled.
- ///
- /// A boolean indicating whether gaze plus switch is enabled.
- public static bool GetIsSwitchEnabled(UIElement element)
- {
- return (bool)element.GetValue(IsSwitchEnabledProperty);
- }
-
- ///
- /// Sets the status of gaze interaction over that particular XAML element.
- ///
- public static void SetInteraction(UIElement element, Interaction value)
- {
- element.SetValue(InteractionProperty, value);
- }
-
- ///
- /// Sets a boolean indicating whether cursor is shown while user is looking at the school.
- ///
- public static void SetIsCursorVisible(UIElement element, bool value)
- {
- element.SetValue(IsCursorVisibleProperty, value);
- }
-
- ///
- /// Sets the size of the gaze cursor radius.
- ///
- public static void SetCursorRadius(UIElement element, int value)
- {
- element.SetValue(CursorRadiusProperty, value);
- }
-
- ///
- /// Sets the GazeElement associated with an UIElement.
- ///
- public static void SetGazeElement(UIElement element, GazeElement value)
- {
- element.SetValue(GazeElementProperty, value);
- }
-
- ///
- /// Sets the duration for the control to transition from the Enter state to the Fixation state. At this point, a StateChanged event is fired with PointerState set to Fixation. This event should be used to control the earliest visual feedback the application needs to provide to the user about the gaze location. The default is 350ms.
- ///
- public static void SetFixationDuration(UIElement element, TimeSpan span)
- {
- element.SetValue(FixationDurationProperty, span);
- }
-
- ///
- /// Sets the duration for the control to transition from the Fixation state to the Dwell state. At this point, a StateChanged event is fired with PointerState set to Dwell. The Enter and Fixation states are typically achieved too rapidly for the user to have much control over. In contrast Dwell is conscious event. This is the point at which the control is invoked, e.g. a button click. The application can modify this property to control when a gaze enabled UI element gets invoked after a user starts looking at it.
- ///
- public static void SetDwellDuration(UIElement element, TimeSpan span)
- {
- element.SetValue(DwellDurationProperty, span);
- }
-
- ///
- /// Sets the additional duration for the first repeat to occur.This prevents inadvertent repeated invocation.
- ///
- public static void SetRepeatDelayDuration(UIElement element, TimeSpan span)
- {
- element.SetValue(RepeatDelayDurationProperty, span);
- }
-
- ///
- /// Sets the duration of repeated dwell invocations, should the user continue to dwell on the control. The first repeat will occur after an additional delay specified by RepeatDelayDuration. Subsequent repeats happen after every period of DwellRepeatDuration. A control is invoked repeatedly only if MaxDwellRepeatCount is set to greater than zero.
- ///
- public static void SetDwellRepeatDuration(UIElement element, TimeSpan span)
- {
- element.SetValue(DwellRepeatDurationProperty, span);
- }
-
- ///
- /// Sets the duration that controls when the PointerState moves to either the Enter state or the Exit state. When this duration has elapsed after the user's gaze first enters a control, the PointerState is set to Enter. And when this duration has elapsed after the user's gaze has left the control, the PointerState is set to Exit. In both cases, a StateChanged event is fired. The default is 50ms.
- ///
- public static void SetThresholdDuration(UIElement element, TimeSpan span)
- {
- element.SetValue(ThresholdDurationProperty, span);
- }
-
- ///
- /// Sets the maximum times the control will invoked repeatedly without the user's gaze having to leave and re-enter the control. The default value is zero which disables repeated invocation of a control. Developers can set a higher value to enable repeated invocation.
- ///
- public static void SetMaxDwellRepeatCount(UIElement element, int value)
- {
- element.SetValue(MaxDwellRepeatCountProperty, value);
- }
-
- ///
- /// Sets the boolean indicating whether gaze plus switch is enabled.
- ///
- public static void SetIsSwitchEnabled(UIElement element, bool value)
- {
- element.SetValue(IsSwitchEnabledProperty, value);
- }
-
- ///
- /// Gets the GazePointer object.
- ///
- /// The GazePointer associated with that particular page.
- public static GazePointer GetGazePointer(Page page)
- {
- return GazePointer.Instance;
- }
-
- ///
- /// Invoke the default action of the specified UIElement.
- ///
- public static void Invoke(UIElement element)
- {
- var item = GazeTargetItem.GetOrCreate(element);
- item.Invoke();
- }
-
- ///
- /// Gets a value indicating whether a gaze input device is available, and hence whether there is any possibility of gaze events occurring in the application.
- ///
- public static bool IsDeviceAvailable
- {
- get
- {
- return GazePointer.Instance.IsDeviceAvailable;
- }
- }
-
- ///
- /// Event triggered whenever IsDeviceAvailable changes value.
- ///
- public static event EventHandler