diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 00000000000..9225e97f11a
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,238 @@
+# Remove the line below if you want to inherit .editorconfig settings from higher directories
+root = true
+
+# C# files
+[*.cs]
+
+#### Core EditorConfig Options ####
+
+# Indentation and spacing
+indent_size = 4
+indent_style = space
+tab_width = 4
+
+# New line preferences
+end_of_line = crlf
+insert_final_newline = false
+
+#### .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 = true
+csharp_indent_labels = one_less_than_current
+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 = _
+
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
index dd3c9c7257a..d3f9dd4e928 100644
--- a/.github/ISSUE_TEMPLATE.md
+++ b/.github/ISSUE_TEMPLATE.md
@@ -3,6 +3,10 @@ PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATI
ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION.
-->
+
+
+
+
## I'm submitting a...
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 0284bbf979e..3dce68fa2f8 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -27,7 +27,7 @@ What kind of change does this PR introduce?
Please check if your PR fulfills the following requirements:
- [ ] Tested code with current [supported SDKs](../readme.md#supported)
-- [ ] Docs have been added/updated which fit [documentation template](https://github.com/windows-toolkit/WindowsCommunityToolkit/blob/master/docs/.template.md). (for bug fixes / features)
+- [ ] Pull Request has been submitted to the documentation repository [instructions](..\contributing.md#docs). Link:
- [ ] 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/windows-toolkit/WindowsCommunityToolkit-design-assets)
- [ ] Tests for the changes have been added (for bug fixes / features) (if applicable)
diff --git a/Directory.Build.props b/Directory.Build.props
index a16c8db719d..4f6d23454b8 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -14,9 +14,6 @@
$(MSBuildProjectName.Contains('.Design'))$(MSBuildProjectName.Contains('Test'))$(MSBuildProjectName.Contains('Uwp'))
- $(MSBuildProjectName.Contains('Win32'))
- $(MSBuildProjectName.Contains('Wpf'))
- $(MSBuildProjectName.Contains('Forms'))$(MSBuildProjectName.Contains('Sample'))1776316299
@@ -28,54 +25,6 @@
$(MSBuildThisFileDirectory)toolkit.snk
-
-
-
- Debug
- AnyCPU
- 15.0
- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
-
-
- 10.0.17763.0
- 10.0.17134.0
-
-
- 512
- true
- prompt
- 4
-
- true
- 1591
- Off
- bin\$(Platform)\$(Configuration)
- true
-
-
-
- true
- full
- $(DefineConstants);DEBUG;TRACE
- false
-
-
- true
- pdbonly
- true
- $(DefineConstants);TRACE
-
-
-
-
@@ -85,7 +34,7 @@
-
+ true
diff --git a/Directory.Build.targets b/Directory.Build.targets
index 6fc2390d33a..2f44693b6c2 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -19,21 +19,6 @@
-
-
-
- 10.0.$(DefaultTargetPlatformVersion).0
- 10.0.$(DefaultTargetPlatformMinVersion).0
-
-
-
- $(MSBuildProgramFiles32)\Windows Kits\10\UnionMetadata\$(TargetPlatformMinVersion)\Windows.winmd
- $(MSBuildProgramFiles32)\Windows Kits\10\UnionMetadata\$(TargetPlatformVersion)\Windows.winmd
- False
-
-
-
-
diff --git a/Microsoft.Toolkit.Parsers/Markdown/Blocks/YamlHeaderBlock.cs b/Microsoft.Toolkit.Parsers/Markdown/Blocks/YamlHeaderBlock.cs
new file mode 100644
index 00000000000..b2ca0c7b238
--- /dev/null
+++ b/Microsoft.Toolkit.Parsers/Markdown/Blocks/YamlHeaderBlock.cs
@@ -0,0 +1,166 @@
+// 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.Text;
+using Microsoft.Toolkit.Parsers.Markdown.Helpers;
+
+namespace Microsoft.Toolkit.Parsers.Markdown.Blocks
+{
+ ///
+ /// Yaml Header. use for blog.
+ /// e.g.
+ /// ---
+ /// title: something
+ /// tag: something
+ /// ---
+ ///
+ public class YamlHeaderBlock : MarkdownBlock
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public YamlHeaderBlock()
+ : base(MarkdownBlockType.YamlHeader)
+ {
+ }
+
+ ///
+ /// Gets or sets yaml header properties
+ ///
+ public Dictionary Children { get; set; }
+
+ ///
+ /// Parse yaml header
+ ///
+ /// The markdown text.
+ /// The location of the first hash character.
+ /// The location of the end of the line.
+ /// The location of the actual end of the aprse.
+ /// Parsed class
+ internal static YamlHeaderBlock Parse(string markdown, int start, int end, out int realEndIndex)
+ {
+ // As yaml header, must be start a line with "---"
+ // and end with a line "---"
+ realEndIndex = start;
+ int lineStart = start;
+ if (end - start < 3)
+ {
+ return null;
+ }
+
+ if (lineStart != 0 || markdown.Substring(start, 3) != "---")
+ {
+ return null;
+ }
+
+ int startUnderlineIndex = Common.FindNextSingleNewLine(markdown, lineStart, end, out int startOfNextLine);
+ if (startUnderlineIndex - lineStart != 3)
+ {
+ return null;
+ }
+
+ bool lockedFinalUnderline = false;
+
+ // if current line not contain the ": ", check it is end of parse, if not, exit
+ // if next line is the end, exit
+ int pos = startOfNextLine;
+ List elements = new List();
+ while (pos < end)
+ {
+ int nextUnderLineIndex = Common.FindNextSingleNewLine(markdown, pos, end, out startOfNextLine);
+ bool haveSeparator = markdown.Substring(pos, nextUnderLineIndex - pos).Contains(": ");
+ if (haveSeparator)
+ {
+ elements.Add(markdown.Substring(pos, nextUnderLineIndex - pos));
+ }
+ else if (end - pos >= 3 && markdown.Substring(pos, 3) == "---")
+ {
+ lockedFinalUnderline = true;
+ realEndIndex = pos + 3;
+ break;
+ }
+ else if (startOfNextLine == pos + 1)
+ {
+ pos = startOfNextLine;
+ continue;
+ }
+ else
+ {
+ return null;
+ }
+
+ pos = startOfNextLine;
+ }
+
+ // if not have the end, return
+ if (!lockedFinalUnderline)
+ {
+ return null;
+ }
+
+ // parse yaml header properties
+ if (elements.Count < 1)
+ {
+ return null;
+ }
+
+ var result = new YamlHeaderBlock();
+ var keys = new List();
+ var values = new List();
+ result.Children = new Dictionary();
+ foreach (var item in elements)
+ {
+ string[] splits = item.Split(new string[] { ": " }, StringSplitOptions.None);
+ if (splits.Length < 2)
+ {
+ continue;
+ }
+ else
+ {
+ string key = splits[0];
+ string value = splits[1];
+ if (key.Trim().Length == 0)
+ {
+ continue;
+ }
+
+ value = string.IsNullOrEmpty(value.Trim()) ? string.Empty : value;
+ result.Children.Add(key, value);
+ }
+ }
+
+ if (result.Children == null)
+ {
+ return null;
+ }
+
+ return result;
+ }
+
+ ///
+ /// Converts the object into it's textual representation.
+ ///
+ /// The textual representation of this object.
+ public override string ToString()
+ {
+ if (Children == null)
+ {
+ return base.ToString();
+ }
+ else
+ {
+ string result = string.Empty;
+ foreach (KeyValuePair item in Children)
+ {
+ result += item.Key + ": " + item.Value + "\n";
+ }
+
+ result.TrimEnd('\n');
+ return result;
+ }
+ }
+ }
+}
diff --git a/Microsoft.Toolkit.Parsers/Markdown/Enums/InlineParseMethod.cs b/Microsoft.Toolkit.Parsers/Markdown/Enums/InlineParseMethod.cs
index db1d3bfc8b5..fa9c9838837 100644
--- a/Microsoft.Toolkit.Parsers/Markdown/Enums/InlineParseMethod.cs
+++ b/Microsoft.Toolkit.Parsers/Markdown/Enums/InlineParseMethod.cs
@@ -76,6 +76,11 @@ internal enum InlineParseMethod
///
Superscript,
+ ///
+ /// Sub script element.
+ ///
+ Subscript,
+
///
/// Image element.
///
diff --git a/Microsoft.Toolkit.Parsers/Markdown/Enums/MarkdownBlockType.cs b/Microsoft.Toolkit.Parsers/Markdown/Enums/MarkdownBlockType.cs
index 32d5c13ff2a..9443cd3e93c 100644
--- a/Microsoft.Toolkit.Parsers/Markdown/Enums/MarkdownBlockType.cs
+++ b/Microsoft.Toolkit.Parsers/Markdown/Enums/MarkdownBlockType.cs
@@ -57,6 +57,11 @@ public enum MarkdownBlockType
///
/// A link block
///
- LinkReference
+ LinkReference,
+
+ ///
+ /// A Yaml header block
+ ///
+ YamlHeader
}
}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Parsers/Markdown/Enums/MarkdownInlineType.cs b/Microsoft.Toolkit.Parsers/Markdown/Enums/MarkdownInlineType.cs
index 8d0fa9ee068..673e1c53263 100644
--- a/Microsoft.Toolkit.Parsers/Markdown/Enums/MarkdownInlineType.cs
+++ b/Microsoft.Toolkit.Parsers/Markdown/Enums/MarkdownInlineType.cs
@@ -54,6 +54,11 @@ public enum MarkdownInlineType
///
Superscript,
+ ///
+ /// A subscript run
+ ///
+ Subscript,
+
///
/// A code run
///
diff --git a/Microsoft.Toolkit.Parsers/Markdown/Helpers/Common.cs b/Microsoft.Toolkit.Parsers/Markdown/Helpers/Common.cs
index 80fe0cf7e28..3e74b70d858 100644
--- a/Microsoft.Toolkit.Parsers/Markdown/Helpers/Common.cs
+++ b/Microsoft.Toolkit.Parsers/Markdown/Helpers/Common.cs
@@ -27,6 +27,7 @@ static Common()
CommentInline.AddTripChars(_triggerList);
StrikethroughTextInline.AddTripChars(_triggerList);
SuperscriptTextInline.AddTripChars(_triggerList);
+ SubscriptTextInline.AddTripChars(_triggerList);
CodeInline.AddTripChars(_triggerList);
ImageInline.AddTripChars(_triggerList);
EmojiInline.AddTripChars(_triggerList);
@@ -183,6 +184,10 @@ private static InlineParseResult FindNextInlineElement(string markdown, int star
parseResult = SuperscriptTextInline.Parse(markdown, pos, end);
break;
+ case InlineParseMethod.Subscript:
+ parseResult = SubscriptTextInline.Parse(markdown, pos, end);
+ break;
+
case InlineParseMethod.Code:
parseResult = CodeInline.Parse(markdown, pos, end);
break;
diff --git a/Microsoft.Toolkit.Parsers/Markdown/Inlines/CommentInline.cs b/Microsoft.Toolkit.Parsers/Markdown/Inlines/CommentInline.cs
index 01b4bad39a2..082b862889a 100644
--- a/Microsoft.Toolkit.Parsers/Markdown/Inlines/CommentInline.cs
+++ b/Microsoft.Toolkit.Parsers/Markdown/Inlines/CommentInline.cs
@@ -47,7 +47,6 @@ internal static InlineParseResult Parse(string markdown, int start, int maxEnd)
return null;
}
- // Check the start sequence.
string startSequence = markdown.Substring(start);
if (!startSequence.StartsWith("
+
+ The TabView control has multiple uses.
+
+
+ It has a lot of versitility out of the box for different scenarios.
+
+
+ You can enable drag-and-drop and reorder the tabs too.
+
+
+ This tab isn't closable because its IsClosable property is set to False, even when CanCloseTabs is True.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/Twitter Service/TwitterPage.xaml.cs b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/Twitter Service/TwitterPage.xaml.cs
index 978cc363e1b..1259e763f67 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/Twitter Service/TwitterPage.xaml.cs
+++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/Twitter Service/TwitterPage.xaml.cs
@@ -78,7 +78,7 @@ private async void ConnectButton_OnClick(object sender, RoutedEventArgs e)
if ((ex.Errors?.Errors?.Length > 0) && (ex.Errors.Errors[0].Code == 89))
{
await new MessageDialog("Invalid or expired token. Logging out. Re-connect for new token.").ShowAsync();
- TwitterService.Instance.Logout();
+ await TwitterService.Instance.LogoutAsync();
return;
}
else
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/Weibo Service/WeiboPage.xaml.cs b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/Weibo Service/WeiboPage.xaml.cs
index f3b7032adb4..a5c70ac9e06 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/Weibo Service/WeiboPage.xaml.cs
+++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/Weibo Service/WeiboPage.xaml.cs
@@ -67,7 +67,7 @@ private async void ConnectButton_OnClick(object sender, RoutedEventArgs e)
if (ex.Error.Code == 21332)
{
await new MessageDialog("Invalid or expired token. Logging out. Re-connect for new token.").ShowAsync();
- WeiboService.Instance.Logout();
+ await WeiboService.Instance.LogoutAsync();
return;
}
else
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/samples.json b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/samples.json
index 768919107c7..fbefd9bd7e3 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/samples.json
+++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/samples.json
@@ -7,290 +7,301 @@
"Name": "TextToolbar",
"Type": "TextToolbarPage",
"About": "A Toolbar for Editing Text attached to a RichEditBox. It can format RTF and Markdown, or use a Custom Formatter, and specify your own Formatter with Buttons and Actions.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/TextToolbar",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/TextToolbar",
"XamlCodeFile": "TextToolbar.bind",
"CodeFile": "TextToolbarCode.bind",
"Icon": "/SamplePages/TextToolbar/TextToolbar.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/TextToolbar.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/TextToolbar.md"
+ },
+ {
+ "Name": "TabView",
+ "Type": "TabViewPage",
+ "About": "A control for displaying multiple items in the same space and allows a user to easily switch between them.",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/TabView",
+ "XamlCodeFile": "TabViewXaml.bind",
+ "Icon": "/SamplePages/TabView/TabView.png",
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/TabView.md"
},
{
"Name": "DataGrid",
"Type": "DataGridPage",
"About": "Control that presents data in a customizable table of rows and columns.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid",
"XamlCodeFile": "DataGridCode.bind",
"Icon": "/SamplePages/DataGrid/DataGrid.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/DataGrid.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/DataGrid.md"
},
{
"Name": "Carousel",
"Type": "CarouselPage",
"About": "Presents items in a carousel control. It reacts to changes in the layout as well as the content so it can adapt to different form factors automatically.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/Carousel",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/Carousel",
"XamlCodeFile": "CarouselCode.bind",
"Icon": "/SamplePages/Carousel/Carousel.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/Carousel.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/Carousel.md"
},
{
"Name": "AdaptiveGridView",
"Type": "AdaptiveGridViewPage",
"About": "Presents items in a evenly-spaced set of columns to fill the total available display space. It reacts to changes in the layout as well as the content so it can adapt to different form factors automatically.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/AdaptiveGridView",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/AdaptiveGridView",
"XamlCodeFile": "AdaptiveGridViewCode.bind",
"Icon": "/SamplePages/AdaptiveGridView/AdaptiveGridView.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/AdaptiveGridView.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/AdaptiveGridView.md"
},
{
"Name": "UniformGrid",
"Type": "UniformGridPage",
"About": "Presents items in a evenly-spaced set of rows or columns to fill the total available display space. It reacts to changes in the layout as well as the content so it can adapt to different form factors automatically.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/UniformGrid",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/UniformGrid",
"XamlCodeFile": "UniformGridXaml.bind",
"Icon": "/SamplePages/UniformGrid/UniformGrid.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/UniformGrid.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/UniformGrid.md"
},
{
"Name": "RangeSelector",
"Type": "RangeSelectorPage",
"About": "The RangeSelector is a \"double slider\" control for range values.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/RangeSelector",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/RangeSelector",
"XamlCodeFile": "RangeSelectorCode.bind",
"Icon": "/SamplePages/RangeSelector/RangeSelector.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/RangeSelector.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/RangeSelector.md"
},
{
"Name": "ImageEx",
"Type": "ImageExPage",
"About": "Images are downloaded asynchronously showing a load indicator. Source images are then stored in the App local cache to preserve resources and load time.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/ImageEx",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/ImageEx",
"XamlCodeFile": "ImageExCode.bind",
"Icon": "/SamplePages/ImageEx/ImageEx.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/ImageEx.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/ImageEx.md"
},
{
"Name": "HeaderedTextBlock",
"Type": "HeaderedTextBlockPage",
"About": "The HeaderedTextBlock control is designed to provide a header for read only text. This control is useful for displaying read only forms.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/HeaderedTextBlock",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/HeaderedTextBlock",
"XamlCodeFile": "HeaderedTextBlockCode.bind",
"Icon": "/SamplePages/HeaderedTextBlock/HeaderedTextBlock.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/HeaderedTextBlock.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/HeaderedTextBlock.md",
+ "BadgeUpdateVersionRequired": "DEPRECATED",
+ "DeprecatedWarning": "The HeaderedTextBlock has been replaced with the HeaderedContentControl and will be removed in a future major release."
},
{
"Name": "MasterDetailsView",
"Type": "MasterDetailsViewPage",
"About": "The MasterDetailsView control allows the user to implement the Master/Details design pattern.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/MasterDetailsView",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/MasterDetailsView",
"XamlCodeFile": "MasterDetailsView.bind",
"CodeFile": "MasterDetailsViewCode.bind",
"Icon": "/SamplePages/MasterDetailsView/MasterDetailsView.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/MasterDetailsView.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/MasterDetailsView.md"
},
{
"Name": "MarkdownTextBlock",
"Type": "MarkdownTextBlockPage",
"About": "An efficient and extensible control that can parse and render markdown.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/MarkdownTextBlock",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/MarkdownTextBlock",
"XamlCodeFile": "MarkdownTextBlock.bind",
"CodeFile": "MarkdownTextBlockCode.bind",
"Icon": "/SamplePages/MarkdownTextBlock/MarkdownTextBlock.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/MarkdownTextBlock.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/MarkdownTextBlock.md"
},
{
"Name": "RadialGauge",
"Type": "RadialGaugePage",
"About": "The radial gauge displays a value within a range, using a needle on a circular face.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/RadialGauge",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/RadialGauge",
"XamlCodeFile": "RadialGaugeCode.bind",
"Icon": "/SamplePages/RadialGauge/RadialGauge.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/RadialGauge.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/RadialGauge.md"
},
{
"Name": "RadialProgressBar",
"Type": "RadialProgressBarPage",
"About": "The radial progress bar displays progress as a circle getting filled.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/RadialProgressBar",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/RadialProgressBar",
"XamlCodeFile": "RadialProgressBarCode.bind",
"Icon": "/SamplePages/RadialProgressBar/RadialProgressBar.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/RadialProgressBar.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/RadialProgressBar.md"
},
{
"Name": "RotatorTile",
"Type": "RotatorTilePage",
"About": "RotatorTile is an ItemsControl that rotates through a set of items one-by-one. It enables you to show multiple items of data in a live-tile like way.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/RotatorTile",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/RotatorTile",
"XamlCodeFile": "RotatorTileCode.bind",
"Icon": "/SamplePages/RotatorTile/RotatorTile.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/RotatorTile.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/RotatorTile.md"
},
{
"Name": "BladeView",
"Type": "BladePage",
"About": "BladeView provides a horizontal collection of blades for master-detail scenarios. The control is based on the experience demonstrated by the Azure Portal.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/BladeView",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/BladeView",
"XamlCodeFile": "BladeCode.bind",
"Icon": "/SamplePages/BladeView/BladeView.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/BladeView.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/BladeView.md"
},
{
"Name": "ScrollHeader",
"Type": "ScrollHeaderPage",
"About": "A UI control that works as a ListView or GridView header control with quick return, sticky and fade behavior.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/ScrollHeader",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/ScrollHeader",
"XamlCodeFile": "ScrollHeaderCode.bind",
"Icon": "/SamplePages/ScrollHeader/ScrollHeader.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/ScrollHeader.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/ScrollHeader.md"
},
{
"Name": "GridSplitter",
"Type": "GridSplitterPage",
"About": "GridSplitter represents the control that redistributes space between columns or rows of a Grid control.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/GridSplitter",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/GridSplitter",
"XamlCodeFile": "GridSplitter.bind",
"Icon": "/SamplePages/GridSplitter/GridSplitter.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/GridSplitter.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/GridSplitter.md"
},
{
"Name": "DropShadowPanel",
"Type": "DropShadowPanelPage",
"About": "DropShadowPanel contol allows the creation of a DropShadow for any Xaml FrameworkElement in markup.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/DropShadowPanel",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/DropShadowPanel",
"XamlCodeFile": "DropShadowPanelXaml.bind",
"Icon": "/SamplePages/DropShadowPanel/DropShadowPanel.png",
"BadgeUpdateVersionRequired": "Anniversary Update required",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/DropShadowPanel.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/DropShadowPanel.md"
},
{
"Name": "Loading",
"Type": "LoadingPage",
"About": "LoadingControl helps to show content with animation to the user while the app is doing some calculation.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/Loading",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/Loading",
"XamlCodeFile": "LoadingCode.bind",
"Icon": "/SamplePages/Loading/Loading.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/Loading.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/Loading.md"
},
{
"Name": "Expander",
"Type": "ExpanderPage",
"About": "Expander control allows user to show/hide content based on a boolean state.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/Expander",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/Expander",
"XamlCodeFile": "ExpanderXaml.bind",
"Icon": "/SamplePages/Expander/Expander.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/Expander.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/Expander.md"
},
{
"Name": "TileControl",
"Type": "TileControlPage",
"About": "A ContentControl that show an image repeated many times.The control can be synchronized with a Scrollviewer and animated easily",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/TileControl",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/TileControl",
"XamlCodeFile": "TileControl.bind",
"Icon": "/SamplePages/TileControl/TileControl.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/TileControl.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/TileControl.md"
},
{
"Name": "WrapPanel",
"Type": "WrapPanelPage",
"About": "The WrapPanel Control positions child elements in sequential position from left to right, breaking content to the next line at the edge of the containing box.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/WrapPanel",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/WrapPanel",
"XamlCodeFile": "WrapPanel.bind",
"Icon": "/SamplePages/WrapPanel/WrapPanel.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/WrapPanel.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/WrapPanel.md"
},
{
"Name": "OrbitView",
"Type": "OrbitViewPage",
"About": "The OrbitView Control positions items in a circle around a center element and supports orbits and anchors.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/OrbitView",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/OrbitView",
"XamlCodeFile": "OrbitViewXaml.bind",
"Icon": "/SamplePages/OrbitView/OrbitView.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/OrbitView.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/OrbitView.md"
},
{
"Name": "Menu",
"Type": "MenuPage",
"About": "Represents a Windows menu control that enables you to hierarchically organize elements associated with commands and event handlers.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/Menu",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/Menu",
"XamlCodeFile": "Menu.bind",
"Icon": "/SamplePages/Menu/Menu.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/Menu.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/Menu.md"
},
{
"Name": "InAppNotification",
"Type": "InAppNotificationPage",
"About": "The In App Notification control offers the ability to show local notifications in your application.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification",
"XamlCodeFile": "InAppNotificationXaml.bind",
"CodeFile": "InAppNotificationCode.bind",
"Icon": "/SamplePages/InAppNotification/InAppNotification.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/InAppNotification.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/InAppNotification.md"
},
{
"Name": "DockPanel",
"Type": "DockPanelPage",
"About": "Defines an area where you can arrange child elements either horizontally or vertically, relative to each other.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/DockPanel",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/DockPanel",
"XamlCodeFile": "DockPanel.bind",
"Icon": "/SamplePages/DockPanel/DockPanel.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/DockPanel.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/DockPanel.md"
},
{
"Name": "HeaderedContentControl",
"Type": "HeaderedContentControlPage",
"About": "Allows content to be displayed with a specified header.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/HeaderedContentControl",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/HeaderedContentControl",
"XamlCodeFile": "HeaderedContentControlXaml.bind",
"Icon": "/SamplePages/HeaderedContentControl/HeaderedContentControl.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/HeaderedContentControl.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/HeaderedContentControl.md"
},
{
"Name": "HeaderedItemsControl",
"Type": "HeaderedItemsControlPage",
"About": "Allows items to be displayed with a specified header.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/HeaderedItemsControl",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/HeaderedItemsControl",
"XamlCodeFile": "HeaderedItemsControlXaml.bind",
"Icon": "/SamplePages/HeaderedItemsControl/HeaderedItemsControl.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/HeaderedItemsControl.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/HeaderedItemsControl.md"
},
{
"Name": "StaggeredPanel",
"Type": "StaggeredPanelPage",
"About": "The StaggeredPanel allows for layout of items in a column approach where an item will be added to whichever column has used the least amount of space.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/StaggeredPanel",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/StaggeredPanel",
"XamlCodeFile": "StaggeredPanel.bind",
"Icon": "/SamplePages/StaggeredPanel/StaggeredPanel.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/StaggeredPanel.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/StaggeredPanel.md"
},
{
"Name": "LayoutTransformControl",
"Type": "LayoutTransformControlPage",
"About": "Control that implements support for transformations as if applied by LayoutTransform.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/LayoutTransformControl",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/LayoutTransformControl",
"XamlCodeFile": "LayoutTransformControlXaml.bind",
"Icon": "/SamplePages/LayoutTransformControl/LayoutTransformControl.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/LayoutTransformControl.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/LayoutTransformControl.md"
},
{
"Name": "CameraPreview",
"Type": "CameraPreviewPage",
"About": "Allows to easily preview video from available camera frame source groups and also get realtime video frames/ software bitmaps from the selected source.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/CameraPreview",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/CameraPreview",
"XamlCodeFile": "CameraPreviewXaml.bind",
"CodeFile": "CameraPreviewCode.bind",
"Icon": "/SamplePages/CameraPreview/CameraPreview.png",
"BadgeUpdateVersionRequired": "April 2018 update required",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/CameraPreview.md",
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/CameraPreview.md",
"ApiCheck": "Windows.Devices.Input.Preview.GazeInputSourcePreview" // check for April update
},
{
"Name": "InfiniteCanvas",
"Type": "InfiniteCanvasPage",
"About": "InfiniteCanvas is a canvas that supports Infinite Scrolling, Ink, Text, Format Text, Zoom in/out, Redo, Undo, Export canvas data, Import canvas data.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas",
"XamlCodeFile": "InfiniteCanvas.bind",
"Icon": "/SamplePages/InfiniteCanvas/InfiniteCanvas.png",
"ApiCheck": "Windows.UI.Xaml.Controls.ColorPicker",
"BadgeUpdateVersionRequired": "Fall Creators Update required",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/InfiniteCanvas.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/InfiniteCanvas.md"
}
]
},
@@ -302,63 +313,63 @@
"Name": "Fade",
"Type": "FadeBehaviorPage",
"About": "Opacity of XAML elements using composition",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors",
"CodeFile": "FadeBehaviorCode.bind",
"XamlCodeFile": "FadeBehaviorXaml.bind",
"Icon": "/SamplePages/Fade/FadeBehavior.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/animations/Fade.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/animations/Fade.md"
},
{
"Name": "Scale",
"Type": "ScaleBehaviorPage",
"About": "Scale of XAML elements using composition",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors",
"CodeFile": "ScaleBehaviorCode.bind",
"XamlCodeFile": "ScaleBehaviorXaml.bind",
"Icon": "/SamplePages/Scale/scaleBehavior.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/animations/Scale.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/animations/Scale.md"
},
{
"Name": "Offset",
"Type": "OffsetBehaviorPage",
"About": "Offset of XAML elements using composition",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors",
"CodeFile": "OffsetBehaviorCode.bind",
"XamlCodeFile": "OffsetBehaviorXaml.bind",
"Icon": "/SamplePages/Offset/offsetBehavior.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/animations/Offset.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/animations/Offset.md"
},
{
"Name": "Rotate",
"Type": "RotateBehaviorPage",
"About": "Rotation on XAML elements using composition",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors",
"CodeFile": "RotateBehaviorCode.bind",
"XamlCodeFile": "RotateBehaviorXaml.bind",
"Icon": "/SamplePages/Rotate/rotateBehavior.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/animations/Rotate.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/animations/Rotate.md"
},
{
"Name": "Blur",
"Type": "BlurBehaviorPage",
"About": "Blur XAML elements using composition",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors",
"CodeFile": "BlurBehaviorCode.bind",
"XamlCodeFile": "BlurBehaviorXaml.bind",
"Icon": "/SamplePages/Blur/blurBehavior.png",
"BadgeUpdateVersionRequired": "Anniversary Update required",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/animations/Blur.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/animations/Blur.md"
},
{
"Name": "Saturation",
"Type": "SaturationBehaviorPage",
"About": "Saturate XAML elements using composition",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors",
"CodeFile": "SaturationBehaviorCode.bind",
"XamlCodeFile": "SaturationBehaviorXaml.bind",
"Icon": "/SamplePages/Saturation/saturationBehavior.png",
"BadgeUpdateVersionRequired": "Anniversary Update required",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/animations/Saturation.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/animations/Saturation.md"
},
{
"Name": "Light",
@@ -366,99 +377,106 @@
"About": "The Light effect will be removed in a future major release",
"BadgeUpdateVersionRequired": "DEPRECATED",
"DeprecatedWarning": "The Light effect will be removed in a future major release",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors",
"CodeFile": "LightBehaviorCode.bind",
"XamlCodeFile": "LightBehaviorXaml.bind",
"Icon": "/SamplePages/Light/LightBehavior.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/animations/Light.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/animations/Light.md"
},
{
"Name": "FadeHeader",
"Type": "FadeHeaderBehaviorPage",
"About": "Fade ListView and GridView Headers",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors",
"CodeFile": "FadeHeaderBehaviorCode.bind",
"XamlCodeFile": "FadeHeaderBehaviorXaml.bind",
"Icon": "/SamplePages/FadeHeader/FadeHeaderBehavior.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/animations/FadeHeader.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/animations/FadeHeader.md"
},
{
"Name": "ReorderGridAnimation",
"Type": "ReorderGridPage",
"About": "Animates items of a grid when the size changes",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Animations",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Animations",
"XamlCodeFile": "ReorderGrid.bind",
"Icon": "/SamplePages/ReorderGridAnimation/ReorderGrid.png",
"BadgeUpdateVersionRequired": "Anniversary Update required",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/animations/ReorderGrid.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/animations/ReorderGrid.md"
},
{
"Name": "Implicit Animations",
"Type": "ImplicitAnimationsPage",
"About": "Attached properties to enable Implicit animations (including Show and Hide animations) through XAML",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Animations",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Animations",
"Icon": "/SamplePages/Implicit Animations/ImplicitAnimations.png",
"XamlCodeFile": "ImplicitAnimationsCode.bind",
"BadgeUpdateVersionRequired": "Creators Update required",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/animations/ImplicitAnimations.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/animations/ImplicitAnimations.md"
},
{
"Name": "Connected Animations",
"Type": "ConnectedAnimationsPage",
"About": "Attached properties to enable Connected animations through XAML",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Animations/ConnectedAnimations",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Animations/ConnectedAnimations",
"XamlCodeFile": "ConnectedAnimationsCode.bind",
"DisableXamlEditorRendering": true,
"Icon": "/SamplePages/Connected Animations/ConnectedAnimations.png",
"BadgeUpdateVersionRequired": "Creators Update required",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/animations/ConnectedAnimations.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/animations/ConnectedAnimations.md"
}
]
},
{
- "Name": "Win32 Controls",
+ "Name": "WPF and WinForms Controls",
"Samples": [
{
"Name": "WindowsXamlHost",
"About": "This guide helps you add UWP XAML controls to your WPF",
"Icon": "/Assets/Helpers.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/wpf-winforms/WindowsXamlHost.md",
- "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Win32"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/wpf-winforms/WindowsXamlHost.md",
+ "CodeUrl": "https://github.com/windows-toolkit/Microsoft.Toolkit.Win32"
},
{
"Name": "WebView",
"About": "The Windows Community Toolkit provides a version of the UWP web view control that can be used in WPF and Windows Forms applications. This control embeds a view into your application that renders web content using the Microsoft Edge rendering engine",
"Icon": "/Assets/Helpers.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/wpf-winforms/WebView.md",
- "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Win32"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/wpf-winforms/WebView.md",
+ "CodeUrl": "https://github.com/windows-toolkit/Microsoft.Toolkit.Win32"
},
{
"Name": "WebViewCompatible",
"About": "The Windows Community Toolkit provides a version of the UWP web view control that can be used in WPF and Windows Forms applications. This control embeds a view into your application that renders web content in one of two ways. For client environments that support the WebViewControl (Windows 10), that implementation is used. For legacy systems, System.Windows.Controls.WebBrowser implements the view",
"Icon": "/Assets/Helpers.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/wpf-winforms/WebViewCompatible.md",
- "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Win32"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/wpf-winforms/WebViewCompatible.md",
+ "CodeUrl": "https://github.com/windows-toolkit/Microsoft.Toolkit.Win32"
},
{
"Name": "InkCanvas",
"About": "This control is a wrapper to enable use of the UWP InkCanvas control in Windows Forms or WPF",
"Icon": "/Assets/Helpers.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/wpf-winforms/InkCanvas.md",
- "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Win32"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/wpf-winforms/InkCanvas.md",
+ "CodeUrl": "https://github.com/windows-toolkit/Microsoft.Toolkit.Win32"
},
{
"Name": "InkToolbar",
"About": "This control is a wrapper to enable use of the UWP InkToolbar control in Windows Forms or WPF",
"Icon": "/Assets/Helpers.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/wpf-winforms/InkToolbar.md",
- "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Win32"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/wpf-winforms/InkToolbar.md",
+ "CodeUrl": "https://github.com/windows-toolkit/Microsoft.Toolkit.Win32"
},
{
"Name": "MediaPlayerElement",
"About": "This control is a wrapper to enable use of the UWP MediaPlayerElement control in Windows Forms or WPF",
"Icon": "/Assets/Helpers.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/controls/wpf-winforms/MediaPlayerElement.md",
- "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Win32"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/wpf-winforms/MediaPlayerElement.md",
+ "CodeUrl": "https://github.com/windows-toolkit/Microsoft.Toolkit.Win32"
+ },
+ {
+ "Name": "MapControl",
+ "About": "This control is a wrapper to enable use of the UWP MapControl control in Windows Forms or WPF",
+ "Icon": "/Assets/Helpers.png",
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/wpf-winforms/MapControl.md",
+ "CodeUrl": "https://github.com/windows-toolkit/Microsoft.Toolkit.Win32"
}
]
},
@@ -470,56 +488,56 @@
"Name": "AadLogin",
"Type": "AadLoginPage",
"About": "The AadLogin Control leverages existing .NET login libraries to support basic AAD sign-in processes for Microsoft Graph.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls.Graph/AadLogin",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls.Graph/AadLogin",
"CodeFile": "AadLoginCode.bind",
"XamlCodeFile": "AadLoginXaml.bind",
"Icon": "/SamplePages/AadLogin/AadLogin.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/graph/AadLogin.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/graph/AadLogin.md"
},
{
"Name": "ProfileCard",
"Type": "ProfileCardPage",
"About": "The ProfileCard Control is a simple way to display a user in multiple different formats and mixes of name/image/e-mail.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls.Graph/ProfileCard",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls.Graph/ProfileCard",
"XamlCodeFile": "ProfileCardXaml.bind",
"Icon": "/SamplePages/ProfileCard/ProfileCard.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/graph/ProfileCard.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/graph/ProfileCard.md"
},
{
"Name": "PeoplePicker",
"Type": "PeoplePickerPage",
"About": "The PeoplePicker Control is a simple control that allows for selection of one or more users from an organizational AD.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls.Graph/PeoplePicker",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls.Graph/PeoplePicker",
"XamlCodeFile": "PeoplePickerXaml.bind",
"Icon": "/SamplePages/PeoplePicker/PeoplePicker.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/graph/PeoplePicker.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/graph/PeoplePicker.md"
},
{
"Name": "SharePointFileList",
"Type": "SharePointFileListPage",
"About": "The SharePointFileList Control displays a simple list of SharePoint Files.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls.Graph/SharePointFileList",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls.Graph/SharePointFileList",
"CodeFile": "SharePointFileListCode.bind",
"XamlCodeFile": "SharePointFileListXaml.bind",
"Icon": "/SamplePages/SharePointFileList/SharePointFileList.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/graph/SharePointFileList.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/graph/SharePointFileList.md"
},
{
"Name": "PowerBIEmbedded",
"Type": "PowerBIEmbeddedPage",
"About": "The PowerBI embedded control is a simple wrapper to an IFRAME for a PowerBI embed.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls.Graph/PowerBIEmbedded",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls.Graph/PowerBIEmbedded",
"Icon": "/SamplePages/PowerBIEmbedded/PowerBIEmbedded.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/graph/PowerBIEmbedded.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/graph/PowerBIEmbedded.md"
},
{
"Name": "PlannerTaskList",
"Type": "PlannerTaskListPage",
"About": "The PlannerTaskList Control displays a simple list of Planner tasks.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls.Graph/PlannerTaskList",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls.Graph/PlannerTaskList",
"XamlCodeFile": "PlannerTaskListXaml.bind",
"Icon": "/SamplePages/PlannerTaskList/PlannerTaskList.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/graph/PlannerTaskList.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/graph/PlannerTaskList.md"
}
]
},
@@ -531,64 +549,64 @@
"Name": "Facebook Service",
"Type": "FacebookPage",
"About": "The Facebook Service allows you to retrieve or publish data to Facebook graph.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.Services/Services/Facebook",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.Services/Services/Facebook",
"CodeFile": "FacebookCode.bind",
"Icon": "/SamplePages/Facebook Service/FacebookLogo.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/services/Facebook.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/services/Facebook.md"
},
{
"Name": "Twitter Service",
"Type": "TwitterPage",
"About": "The Twitter Service allows you to retrieve or publish data to Twitter.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.Services/Services/Twitter",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Services/Services/Twitter",
"CodeFile": "TwitterCode.bind",
"Icon": "/SamplePages/Twitter Service/TwitterLogo.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/services/Twitter.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/services/Twitter.md"
},
{
"Name": "Weibo Service",
"Type": "WeiboPage",
"About": "The Weibo Service allows you to retrieve or publish data to Weibo.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.Services/Services/Weibo",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Services/Services/Weibo",
"CodeFile": "WeiboCode.bind",
"Icon": "/SamplePages/Weibo Service/WeiboLogo.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/services/Weibo.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/services/Weibo.md"
},
{
"Name": "Microsoft Graph Service",
"Type": "MicrosoftGraphPage",
"About": "The Microsoft Graph service allows you to connect to Microsoft Graph Office 365 API.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.Services/Services/MicrosoftGraph",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Services/Services/MicrosoftGraph",
"CodeFile": "MicrosoftGraphCode.bind",
"Icon": "/SamplePages/Microsoft Graph Service/mslogo.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/services/MicrosoftGraph.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/services/MicrosoftGraph.md"
},
{
"Name": "OneDrive Service",
"Type": "OneDrivePage",
"About": "The OneDrive service allows you to get your files from OneDrive using an Microsoft Account or OneDrive For Business using an Office 365 account",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.Services/Services/OneDrive/",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Services/Services/OneDrive/",
"CodeFile": "OneDriveCode.bind",
"Icon": "/SamplePages/OneDrive Service/OneDriveLogo.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/services/OneDrive.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/services/OneDrive.md"
},
{
"Name": "LinkedIn Service",
"Type": "LinkedInPage",
"About": "The LinkedIn service allows you to connect to retrieve or publish data to LinkedIn.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.Services/Services/LinkedIn/",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Services/Services/LinkedIn/",
"CodeFile": "LinkedInCode.bind",
"Icon": "/SamplePages/LinkedIn Service/LinkedInLogo.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/services/Linkedin.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/services/Linkedin.md"
},
{
"Name": "Microsoft Translator Service",
"Type": "MicrosoftTranslatorPage",
"About": "The Microsoft Translator Service allows you to translate text into many languages.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.Services/Services/MicrosoftTranslator",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Services/Services/MicrosoftTranslator",
"CodeFile": "MicrosoftTranslatorCode.bind",
"Icon": "/SamplePages/Microsoft Translator Service/TranslatorService.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/services/MicrosoftTranslator.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/services/MicrosoftTranslator.md"
}
]
},
@@ -600,31 +618,31 @@
"Name": "LiveTile",
"Type": "LiveTilePage",
"About": "This shows how to update a Live Tile with a rich Adaptive notification.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.Notifications",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.Notifications",
"CodeFile": "LiveTileCode.bind",
"JavaScriptCodeFile": "LiveTileCodeJavaScript.bind",
"Icon": "/SamplePages/LiveTile/LiveTile.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/notifications/NotificationsOverview.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/notifications/NotificationsOverview.md"
},
{
"Name": "Toast",
"Type": "ToastPage",
"About": "This shows how to send a Toast notification.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.Notifications",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.Notifications",
"CodeFile": "ToastCode.bind",
"JavaScriptCodeFile": "ToastCodeJavaScript.bind",
"Icon": "/SamplePages/Toast/Toast.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/notifications/NotificationsOverview.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/notifications/NotificationsOverview.md"
},
{
"Name": "WeatherLiveTileAndToast",
"Type": "WeatherLiveTileAndToastPage",
"About": "This shows how to send a Weather Live Tile and Toast notification, displaying the forecast.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.Notifications",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.Notifications",
"CodeFile": "WeatherLiveTileAndToastCode.bind",
"JavaScriptCodeFile": "WeatherLiveTileAndToastCodeJavaScript.bind",
"Icon": "/SamplePages/WeatherLiveTileAndToast/WeatherLiveTileAndToast.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/notifications/NotificationsOverview.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/notifications/NotificationsOverview.md"
}
]
},
@@ -636,111 +654,111 @@
"Name": "ImageCache",
"Type": "ImageCachePage",
"About": "The ImageCache allows persistence of images with an option to use in-memory storage.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/blob/master/Microsoft.Toolkit.Uwp.UI/Cache/ImageCache.cs",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/blob/master/Microsoft.Toolkit.Uwp.UI/Cache/ImageCache.cs",
"CodeFile": "ImageCacheCode.bind",
"XamlCodeFile": "ImageCacheXaml.bind",
"Icon": "/SamplePages/ImageCache/ImageCache.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/helpers/ImageCache.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/helpers/ImageCache.md"
},
{
"Name": "Object Storage",
"Type": "ObjectStoragePage",
"About": "The Object Storage helper allows you to easily read and save objects in your application, both locally or on every device (roaming).",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp/Helpers/ObjectStorage",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp/Helpers/ObjectStorage",
"CodeFile": "ObjectStorageCode.bind",
"Icon": "/SamplePages/Object Storage/ObjectStorage.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/helpers/ObjectStorage.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/helpers/ObjectStorage.md"
},
{
"Name": "Incremental Loading Collection",
"Type": "IncrementalLoadingCollectionPage",
"About": "Allows to create collections that can be loaded incrementally, as user requests more items in the view. This type of collections can be bound to controls like GridView and ListView.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp/IncrementalLoadingCollection",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp/IncrementalLoadingCollection",
"CodeFile": "IncrementalLoadingCollectionCode.bind",
"Icon": "/SamplePages/Incremental Loading Collection/icon.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/helpers/IncrementalLoadingCollection.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/helpers/IncrementalLoadingCollection.md"
},
{
"Name": "BackgroundTaskHelper",
"Type": "BackgroundTaskHelperPage",
"About": "Allows easy registration and maintenance of background task",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/blob/master/Microsoft.Toolkit.Uwp/Helpers/BackgroundTaskHelper.cs",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/blob/master/Microsoft.Toolkit.Uwp/Helpers/BackgroundTaskHelper.cs",
"CodeFile": "BackgroundTaskHelperCode.bind",
"Icon": "/Assets/Helpers.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/helpers/BackgroundTaskHelper.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/helpers/BackgroundTaskHelper.md"
},
{
"Name": "NetworkHelper",
"Type": "NetworkHelperPage",
"About": "The NetworkHelper class is used to determine whether the app has Internet, and if it is on a metered Internet connection",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.Connectivity/Network",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.Connectivity/Network",
"CodeFile": "NetworkHelperCode.bind",
"Icon": "/SamplePages/NetworkHelper/NetworkHelper.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/helpers/NetworkHelper.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/helpers/NetworkHelper.md"
},
{
"Name": "BluetoothLEHelper",
"Type": "BluetoothLEHelperPage",
"About": "The Bluetooth LE helper class is used to connect and interact with bluetooth LE devices.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper",
"CodeFile": "BluetoothLEHelperCode.bind",
"Icon": "/SamplePages/BluetoothLEHelper/BluetoothLEHelper.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/helpers/BluetoothLEHelper.md",
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/helpers/BluetoothLEHelper.md",
"BadgeUpdateVersionRequired": "Creators Update required"
},
{
"Name": "SystemInformation",
"Type": "SystemInformationPage",
"About": "The SystemInformation class provides easy access to some of system/app/device information",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp/Helpers/SystemInformation.cs",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp/Helpers/SystemInformation.cs",
"CodeFile": "SystemInformationCode.bind",
"Icon": "/SamplePages/SystemInformation/SystemInformation.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/helpers/SystemInformation.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/helpers/SystemInformation.md"
},
{
"Name": "PrintHelper",
"Type": "PrintHelperPage",
"About": "Allows to easily print XAML controls",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp/Helpers/PrintHelper",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp/Helpers/PrintHelper",
"CodeFile": "PrintHelperCode.bind",
"XamlCodeFile": "PrintHelperXaml.bind",
"Icon": "/SamplePages/PrintHelper/PrintHelper.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/helpers/PrintHelper.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/helpers/PrintHelper.md"
},
{
"Name": "DispatcherHelper",
"Type": "DispatcherHelperPage",
"About": "Allows easy interaction with Windows Runtime core message dispatcher for multi-threaded scenario (I.E: Run code on UI thread). ",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/blob/master/Microsoft.Toolkit.Uwp/Helpers/DispatcherHelper.cs",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/blob/master/Microsoft.Toolkit.Uwp/Helpers/DispatcherHelper.cs",
"CodeFile": "DispatcherHelperCode.bind",
"Icon": "/Assets/Helpers.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/helpers/DispatcherHelper.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/helpers/DispatcherHelper.md"
},
{
"Name": "AdvancedCollectionView",
"Type": "AdvancedCollectionViewPage",
"About": "Allows you to easily sort and filter your collections before displaying them.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/AdvancedCollectionView",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/AdvancedCollectionView",
"CodeFile": "AdvancedCollectionView.bind",
"Icon": "/SamplePages/AdvancedCollectionView/AdvancedCollectionView.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/helpers/AdvancedCollectionView.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/helpers/AdvancedCollectionView.md"
},
{
"Name": "CameraHelper",
"Type": "CameraHelperPage",
"About": "Allows to easily get camera frame sources available for media capture to preview video and get real time video frames/software bitmaps.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/blob/master/Microsoft.Toolkit.Uwp/Helpers/CameraHelper/CameraHelper.cs",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/blob/master/Microsoft.Toolkit.Uwp/Helpers/CameraHelper/CameraHelper.cs",
"CodeFile": "CameraHelperCode.bind",
"Icon": "/SamplePages/CameraHelper/CameraHelper.png",
"BadgeUpdateVersionRequired": "April 2018 update required",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/helpers/CameraHelper.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/helpers/CameraHelper.md"
},
{
"Name": "ThemeListener",
"Type": "ThemeListenerPage",
"About": "The ThemeListener allows you to keep track of changes to the System Theme.",
"Icon": "/Assets/Helpers.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/helpers/ThemeListener.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/helpers/ThemeListener.md"
}
]
},
@@ -752,78 +770,78 @@
"Name": "BackdropBlurBrush",
"Type": "BackdropBlurBrushPage",
"About": "Brush which fills the contents with a blurred version of whatever's behind it.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Brushes/BackdropBlurBrush.cs",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Media/BackdropBlurBrush.cs",
"XamlCodeFile": "BackdropBlurBrushXaml.bind",
"Icon": "/SamplePages/BackdropBlurBrush/BackdropBlurBrush.png",
"BadgeUpdateVersionRequired": "Creators Update required",
"ApiCheck": "Windows.UI.Xaml.Media.XamlCompositionBrushBase",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/brushes/BackdropBlurBrush.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/brushes/BackdropBlurBrush.md"
},
{
"Name": "BackdropInvertBrush",
"Type": "BackdropInvertBrushPage",
"About": "Brush which fills the contents with an inverted version of whatever's behind it.",
- "CodeUrl": "https://github.com/Microsoft/UWPCommunitToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Brushes/BackdropInvertBrush.cs",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Media/BackdropInvertBrush.cs",
"XamlCodeFile": "BackdropInvertBrushXaml.bind",
"Icon": "/SamplePages/BackdropInvertBrush/BackdropInvertBrush.png",
"BadgeUpdateVersionRequired": "Creators Update required",
"ApiCheck": "Windows.UI.Xaml.Media.XamlCompositionBrushBase",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/brushes/BackdropInvertBrush.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/brushes/BackdropInvertBrush.md"
},
{
"Name": "BackdropGammaTransferBrush",
"Type": "BackdropGammaTransferBrushPage",
"About": "Brush which fills the contents with a gamma modified version of whatever's behind it.",
- "CodeUrl": "https://github.com/Microsoft/UWPCommunitToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Brushes/BackdropGammaTransferBrush.cs",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Media/BackdropGammaTransferBrush.cs",
"XamlCodeFile": "BackdropGammaTransferBrushXaml.bind",
"Icon": "/SamplePages/BackdropGammaTransferBrush/BackdropGammaTransferBrush.png",
"BadgeUpdateVersionRequired": "Creators Update required",
"ApiCheck": "Windows.UI.Xaml.Media.XamlCompositionBrushBase",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/brushes/BackdropGammaTransferBrush.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/brushes/BackdropGammaTransferBrush.md"
},
{
"Name": "BackdropSaturationBrush",
"Type": "BackdropSaturationBrushPage",
"About": "Brush which applies a Saturation effect to whatever's behind it.",
- "CodeUrl": "https://github.com/Microsoft/UWPCommunitToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Brushes/BackdropSaturationBrush.cs",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Media/BackdropSaturationBrush.cs",
"XamlCodeFile": "BackdropSaturationBrushXaml.bind",
"Icon": "/SamplePages/BackdropSaturationBrush/BackdropSaturationBrush.png",
"BadgeUpdateVersionRequired": "Creators Update required",
"ApiCheck": "Windows.UI.Xaml.Media.XamlCompositionBrushBase",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/brushes/BackdropSaturationBrush.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/brushes/BackdropSaturationBrush.md"
},
{
"Name": "BackdropSepiaBrush",
"Type": "BackdropSepiaBrushPage",
"About": "Brush which applies a Sepia effect to whatever's behind it.",
- "CodeUrl": "https://github.com/Microsoft/UWPCommunitToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Brushes/BackdropSepiaBrush.cs",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Media/BackdropSepiaBrush.cs",
"XamlCodeFile": "BackdropSepiaBrushXaml.bind",
"Icon": "/SamplePages/BackdropSepiaBrush/BackdropSepiaBrush.png",
"BadgeUpdateVersionRequired": "Creators Update required",
"ApiCheck": "Windows.UI.Xaml.Media.XamlCompositionBrushBase",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/brushes/BackdropSepiaBrush.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/brushes/BackdropSepiaBrush.md"
},
{
"Name": "ImageBlendBrush",
"Type": "ImageBlendBrushPage",
"About": "Brush which applies a blending effect a given image from whatever's behind it.",
- "CodeUrl": "https://github.com/Microsoft/UWPCommunitToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Brushes/ImageBlendBrush.cs",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Media/ImageBlendBrush.cs",
"XamlCodeFile": "ImageBlendBrushXaml.bind",
"Icon": "/SamplePages/ImageBlendBrush/ImageBlendBrush.png",
"BadgeUpdateVersionRequired": "Creators Update required",
"ApiCheck": "Windows.UI.Xaml.Media.XamlCompositionBrushBase",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/brushes/ImageBlendBrush.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/brushes/ImageBlendBrush.md"
},
{
"Name": "RadialGradientBrush",
"Type": "RadialGradientBrushPage",
"About": "A composition brush which creates a radial gradient effect.",
- "CodeUrl": "https://github.com/Microsoft/UWPCommunitToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Brushes/RadialGradientBrush.cs",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Media/RadialGradientBrush.cs",
"XamlCodeFile": "RadialGradientBrushXaml.bind",
"Icon": "/SamplePages/RadialGradientBrush/RadialGradientBrush.png",
"BadgeUpdateVersionRequired": "Creators Update required",
"ApiCheck": "Windows.UI.Xaml.Media.XamlCompositionBrushBase",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/brushes/RadialGradientBrush.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/brushes/RadialGradientBrush.md"
}
]
},
@@ -835,92 +853,100 @@
"Name": "ListViewExtensions",
"Type": "ListViewExtensionsPage",
"About": "Extensions for all controls that inherit from ListViewBase like ListView.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Extensions/ListViewExtensions",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Extensions/ListViewExtensions",
"XamlCodeFile": "ListViewExtensionsCode.bind",
"Icon": "/Assets/Helpers.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/extensions/ListViewExtensions.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/extensions/ListViewExtensions.md"
},
{
"Name": "ViewExtensions",
"Type": "ViewExtensionsPage",
"About": "View extensions to set StatusBar and TitleBar properties.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Extensions",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Extensions",
"XamlCodeFile": "ViewExtensionsCode.bind",
"Icon": "/SamplePages/ViewExtensions/ViewExtensions.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/extensions/ViewExtensions.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/extensions/ViewExtensions.md"
},
{
"Name": "TextBoxMask",
"Type": "TextBoxMaskPage",
"About": "TextBox Mask property allows a user to more easily enter fixed width text in TextBox control where you would like them to enter the data in a certain format",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Extensions/TextBoxMask",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Extensions/TextBoxMask",
"XamlCodeFile": "TextBoxMask.bind",
"Icon": "/SamplePages/TextBoxMask/TextBoxMask.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/extensions/TextBoxMask.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/extensions/TextBoxMask.md"
},
{
"Name": "Mouse",
"Type": "MouseCursorPage",
"About": "Mouse.Cursor attached property enables you to easily change the mouse cursor over specific Framework elements.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Extensions/Mouse",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Extensions/Mouse",
"XamlCodeFile": "MouseCursorPage.bind",
"Icon": "/SamplePages/Mouse/MouseCursor.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/extensions/MouseCursor.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/extensions/MouseCursor.md"
},
{
"Name": "TextBoxRegex",
"Type": "TextBoxRegexPage",
"About": "TextBoxRegex helps developer to validate a TextBox with a regular expression using the Regex property.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Extensions/TextBoxRegEx",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Extensions/TextBoxRegEx",
"XamlCodeFile": "TextBoxRegex.bind",
"Icon": "/SamplePages/TextBoxRegex/TextBoxRegex.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/extensions/TextBoxRegex.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/extensions/TextBoxRegex.md"
},
{
"Name": "SurfaceDialTextbox",
"Type": "SurfaceDialTextboxPage",
"About": "Enables support for Surface Dial on any given Textbox. Rotate the Dial to change the numeric value of the Textbox.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Extensions/SurfaceDialTextbox",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Extensions/SurfaceDialTextbox",
"XamlCodeFile": "SurfaceDialTextboxCode.bind",
"Icon": "/SamplePages/SurfaceDialTextbox/SurfaceDialTextbox.png",
"BadgeUpdateVersionRequired": "Anniversary Update required",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/extensions/SurfaceDialTextboxHelper.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/extensions/SurfaceDialTextboxHelper.md"
},
{
"Name": "Visual Extensions",
"Type": "VisualExtensionsPage",
"About": "Attached properties to modify object visual properties through XAML",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Extensions/Visual",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Extensions/Visual",
"XamlCodeFile": "VisualExtensionsCode.bind",
"Icon": "/SamplePages/Visual Extensions/VisualExtensions.png",
"BadgeUpdateVersionRequired": "Creators Update required",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/extensions/VisualExtensions.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/extensions/VisualExtensions.md"
},
{
"Name": "FrameworkElementExtensions",
"Type": "FrameworkElementExtensionsPage",
"About": "Extensions for all the FrameworkElement controls.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Extensions/FrameworkElement",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Extensions/FrameworkElement",
"XamlCodeFile": "FrameworkElementExtensionsCode.bind",
"Icon": "/Assets/Helpers.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/extensions/FrameworkElementExtensions.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/extensions/FrameworkElementExtensions.md"
},
{
"Name": "StringExtensions",
"Type": "StringExtensionsPage",
"About": "String Extensions to validate strings",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit/Extensions",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit/Extensions",
"Icon": "/Assets/Helpers.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/extensions/StringExtensions.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/extensions/StringExtensions.md"
},
{
"Name": "ScrollViewerExtensions",
"Type": "ScrollViewerExtensionsPage",
"About": "Extensions for all controls that contain a ScrollViewer like ListView.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Extensions/ScrollViewer",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI/Extensions/ScrollViewer",
"XamlCodeFile": "ScrollViewerExtensionsCode.bind",
"Icon": "/Assets/Helpers.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/extensions/ScrollViewerExtensions.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/extensions/ScrollViewerExtensions.md"
+ },
+ {
+ "Name": "OnDevice",
+ "Type": "OnDevicePage",
+ "About": "The OnDevice markup extension allows you to customize UI appearance on a per-DeviceFamily basis.",
+ "Icon": "/SamplePages/OnDevice/OnDevice.png",
+ "XamlCodeFile": "OnDeviceXaml.bind",
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/extensions/OnDeviceMarkup.md"
}
]
},
@@ -933,14 +959,14 @@
"Type": "MarkdownParserPage",
"About": "The Markdown Parser allows you to parse a Markdown String into a Markdown Document, and then Render it with a Markdown Renderer.",
"Icon": "/Assets/Helpers.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/parsers/MarkdownParser.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/parsers/MarkdownParser.md"
},
{
"Name": "RSS Parser",
"Type": "RssParserPage",
"About": "The RSS Parser allows you to parse an RSS content String into RSS Schema.",
"Icon": "/Assets/Helpers.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/parsers/RssParser.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/parsers/RssParser.md"
}
]
},
@@ -952,26 +978,26 @@
"Name": "AlignmentGrid",
"Type": "AlignmentGridPage",
"About": "AlignmentGrid is used to display a grid to help aligning controls.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.DeveloperTools/AlignmentGrid",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.DeveloperTools/AlignmentGrid",
"XamlCodeFile": "AlignmentGridXaml.bind",
"Icon": "/SamplePages/AlignmentGrid/AlignmentGrid.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/developer-tools/AlignmentGrid.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/developer-tools/AlignmentGrid.md"
},
{
"Name": "FocusTracker",
"Type": "FocusTrackerPage",
"About": "FocusTracker can be used to display information about the current focused XAML element.",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.DeveloperTools/FocusTracker",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.DeveloperTools/FocusTracker",
"XamlCodeFile": "FocusTrackerXaml.bind",
"Icon": "/SamplePages/FocusTracker/FocusTracker.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/developer-tools/FocusTracker.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/developer-tools/FocusTracker.md"
},
{
"Name": "PlatformSpecificAnalyzer",
"About": "Platform Specific Analyzer is a Roslyn analyzer that analyzes and suggests code fixes to ensure that any version / platform specific API are guarded by correct runtime checks",
"CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.PlatformSpecificAnalyzer",
"Icon": "/Assets/Helpers.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/platform-specific/PlatformSpecificAnalyzer.md"
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/platform-specific/PlatformSpecificAnalyzer.md"
}
]
},
@@ -986,14 +1012,14 @@
"XamlCodeFile": "GazeInteractionXaml.bind",
"CodeFile": "GazeInteractionCode.bind",
"Icon": "/SamplePages/GazeInteraction/GazeInteraction.png",
- "DocumentationUrl": "https://raw.githubusercontent.com/Microsoft/WindowsCommunityToolkit/master/docs/gaze/GazeInteractionLibrary.md",
+ "DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/gaze/GazeInteractionLibrary.md",
"ApiCheck": "Windows.Devices.Input.Preview.GazeInputSourcePreview"
},
{
"Name": "GazeTracing",
"Type": "GazeTracingPage",
"About": "Shows how to use the Windows 10 API for eye trackers",
- "CodeUrl": "https://github.com/Microsoft/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.Input.Gaze/",
+ "CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.Input.Gaze/",
"XamlCodeFile": "GazeTracingXaml.bind",
"CodeFile": "GazeTracingCode.bind",
"Icon": "/SamplePages/GazeTracing/GazeTracing.png",
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/Styles/Generic.xaml b/Microsoft.Toolkit.Uwp.SampleApp/Styles/Generic.xaml
index 3e5053a21da..1be4af82321 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/Styles/Generic.xaml
+++ b/Microsoft.Toolkit.Uwp.SampleApp/Styles/Generic.xaml
@@ -1014,7 +1014,6 @@
-
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/Styles/ThemeInjector.cs b/Microsoft.Toolkit.Uwp.SampleApp/Styles/ThemeInjector.cs
index 36a027e964d..5e809a8495c 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/Styles/ThemeInjector.cs
+++ b/Microsoft.Toolkit.Uwp.SampleApp/Styles/ThemeInjector.cs
@@ -30,13 +30,15 @@ public static void InjectThemeResources(ResourceDictionary dict)
{
TintColor = Helpers.ColorHelper.ToColor("#FF333333"),
TintOpacity = 0.8,
- BackgroundSource = AcrylicBackgroundSource.Backdrop
+ BackgroundSource = AcrylicBackgroundSource.Backdrop,
+ FallbackColor = Helpers.ColorHelper.ToColor("#FF333333")
},
LightAcrylic = new AcrylicBrush
{
TintColor = Colors.White,
TintOpacity = 0.8,
BackgroundSource = AcrylicBackgroundSource.Backdrop,
+ FallbackColor = Colors.White
}
});
@@ -47,13 +49,15 @@ public static void InjectThemeResources(ResourceDictionary dict)
{
TintColor = Helpers.ColorHelper.ToColor("#FF111111"),
TintOpacity = 0.7,
- BackgroundSource = AcrylicBackgroundSource.Backdrop
+ BackgroundSource = AcrylicBackgroundSource.Backdrop,
+ FallbackColor = Helpers.ColorHelper.ToColor("#FF111111")
},
LightAcrylic = new AcrylicBrush
{
TintColor = Helpers.ColorHelper.ToColor("#FFDDDDDD"),
TintOpacity = 0.6,
BackgroundSource = AcrylicBackgroundSource.Backdrop,
+ FallbackColor = Helpers.ColorHelper.ToColor("#FFDDDDDD")
}
});
}
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/landingPageLinks.json b/Microsoft.Toolkit.Uwp.SampleApp/landingPageLinks.json
index f8e55a999ec..5708c57ede0 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/landingPageLinks.json
+++ b/Microsoft.Toolkit.Uwp.SampleApp/landingPageLinks.json
@@ -1,6 +1,6 @@
{
"new-section-title": "What's New",
- "new-samples": [ "DataGrid", "PlannerTaskList", "PowerBIEmbedded", "Twitter Service", "LinkedIn Service" ],
+ "new-samples": [ "WindowsXamlHost", "TabView", "Weibo Service", "InkCanvas", "WebViewCompatible" ],
"resources": [
{
"title": "Toolkit",
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/readme.md b/Microsoft.Toolkit.Uwp.SampleApp/readme.md
index b475896a007..eeda72797c1 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/readme.md
+++ b/Microsoft.Toolkit.Uwp.SampleApp/readme.md
@@ -20,6 +20,7 @@ This makes it easy for a developer to test out values for a control and then cop
In order to provide a property UI and associated code, you have to define a the .bind XAML file associated with your page.
Here is an example:
+
```xaml
@@ -179,14 +180,22 @@ If the specified type is not found on the system running the sample app the samp
### Adding documentation
-Every API must be accompanied by Markdown documentation in the docs folder in the root of this repo.
+Every API must be accompanied by Markdown documentation in the [documentation repository](..\contributing.md#docs).
Use the DocumentationUrl property to add a link to the raw documentation in *samples.json*. Please follow the following pattern:
-`https://raw.githubusercontent.com/windows-toolkit/WindowsCommunityToolkit/{branch}/docs/{folder/file.md}`
+`https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/{branch}/docs/{folder/file.md}`
> NOTE: When building and running the app in release mode, the branch will automatically be changed to **master** before loading.
-> Note: The documentation is also packaged with the sample app. If there is no network connection, or the documentation is not yet on github, the sample app will use the packaged version
+
+> NOTE: The documentation is also packaged with the sample app. If there is no network connection, or the documentation is not yet on github, the sample app will use the packaged version
+
+> NOTE: To test your documentation in the sample app while running in debug mode, the docs repository will need to be cloned in the same folder as this repository and named **WindowsCommunityToolkitDocs**. For exaple, this folder structure works best:
+> ```
+> repositories
+> ├── WindowsCommunityToolkit
+> ├── WindowsCommunityToolkitDocs
+> ```
### CodeUrl
diff --git a/Microsoft.Toolkit.Uwp.UI.Animations/AnimationSet.cs b/Microsoft.Toolkit.Uwp.UI.Animations/AnimationSet.cs
index e63bb66ba37..fa8632942f2 100644
--- a/Microsoft.Toolkit.Uwp.UI.Animations/AnimationSet.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Animations/AnimationSet.cs
@@ -626,8 +626,8 @@ private void HandleCompleted(bool stopped = false)
if (_animationTCS != null && !_animationTCS.Task.IsCompleted)
{
- Completed?.Invoke(this, new AnimationSetCompletedEventArgs() { Completed = _storyboardCompleted && _compositionCompleted });
_animationTCS.SetResult(State == AnimationSetState.Completed);
+ Completed?.Invoke(this, new AnimationSetCompletedEventArgs() { Completed = _storyboardCompleted && _compositionCompleted });
}
}
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Animations/ConnectedAnimations/Connected.cs b/Microsoft.Toolkit.Uwp.UI.Animations/ConnectedAnimations/Connected.cs
index 7e85818af9a..e5dfdcf01b4 100644
--- a/Microsoft.Toolkit.Uwp.UI.Animations/ConnectedAnimations/Connected.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Animations/ConnectedAnimations/Connected.cs
@@ -371,11 +371,27 @@ public static void UnregisterListItemForConnectedAnimation(this Page page, ListV
///
/// The Frame handling the navigation
/// The data item from a list control to be animated during next frame navigation
+ [Obsolete("Method is replaced by SetListDataItemForNextConnectedAnimation")]
public static void SetListDataItemForNextConnectedAnnimation(this Frame frame, object item)
{
GetConnectedAnimationHelper(frame)?.SetParameterForNextFrameNavigation(item);
}
+ ///
+ /// Sets the object that will be used during next Frame navigation for
+ /// Connected Animation involving a list control (item must be an element of
+ /// ListViewBase.ItemsSource collection).
+ /// Useful if the parameter used during page navigation is different from the
+ /// data item in the list control. Also useful during back navigation if the
+ /// item navigating back to is different from the item that was navigated from.
+ ///
+ /// The Frame handling the navigation
+ /// The data item from a list control to be animated during next frame navigation
+ public static void SetListDataItemForNextConnectedAnimation(this Frame frame, object item)
+ {
+ GetConnectedAnimationHelper(frame)?.SetParameterForNextFrameNavigation(item);
+ }
+
private static void OnKeyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
if (!ApiInformationHelper.IsCreatorsUpdateOrAbove)
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/DataGrid.xaml b/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/DataGrid.xaml
index 8a17e0610a6..021cef53831 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/DataGrid.xaml
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/DataGrid.xaml
@@ -12,26 +12,50 @@
+ xmlns:local="using:Microsoft.Toolkit.Uwp.UI.Controls"
+ xmlns:localprimitives="using:Microsoft.Toolkit.Uwp.UI.Controls.Primitives">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -56,13 +80,7 @@
0.8
-
-
-
-
-
-
-
+
@@ -352,7 +370,7 @@
-
+
@@ -503,7 +521,11 @@
-
+
+
+
+
+
@@ -875,7 +897,7 @@
-
+
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Microsoft.Toolkit.Uwp.UI.Controls.Design.csproj b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Microsoft.Toolkit.Uwp.UI.Controls.Design.csproj
index 279b3485d4d..c07758a751b 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Microsoft.Toolkit.Uwp.UI.Controls.Design.csproj
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Microsoft.Toolkit.Uwp.UI.Controls.Design.csproj
@@ -82,6 +82,7 @@
+
@@ -101,6 +102,7 @@
+ Code
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/TabViewItemMetadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/TabViewItemMetadata.cs
new file mode 100644
index 00000000000..6ed6bc37bf8
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/TabViewItemMetadata.cs
@@ -0,0 +1,43 @@
+// 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 Microsoft.Toolkit.Uwp.UI.Controls.Design.Common;
+using Microsoft.Windows.Design;
+using Microsoft.Windows.Design.Features;
+using Microsoft.Windows.Design.Metadata;
+using Microsoft.Windows.Design.Model;
+using Microsoft.Windows.Design.PropertyEditing;
+using System.ComponentModel;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+
+ internal class TabViewItemMetadata : AttributeTableBuilder
+ {
+ public TabViewItemMetadata()
+ : base()
+ {
+ AddCallback(typeof(TabViewItem),
+ b =>
+ {
+ b.AddCustomAttributes(nameof(TabViewItem.Header),
+ new CategoryAttribute(Properties.Resources.CategoryCommon)
+ );
+ b.AddCustomAttributes(nameof(TabViewItem.HeaderTemplate),
+ new CategoryAttribute(Properties.Resources.CategoryCommon),
+ new EditorBrowsableAttribute(EditorBrowsableState.Advanced)
+ );
+ b.AddCustomAttributes(nameof(TabViewItem.IsClosable),
+ new CategoryAttribute(Properties.Resources.CategoryCommon)
+ );
+ b.AddCustomAttributes(nameof(TabViewItem.Icon),
+ new CategoryAttribute(Properties.Resources.CategoryCommon)
+ );
+
+ b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
+ }
+ );
+ }
+ }
+}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/TabViewMetadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/TabViewMetadata.cs
new file mode 100644
index 00000000000..7bfa77541db
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/TabViewMetadata.cs
@@ -0,0 +1,54 @@
+// 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 Microsoft.Toolkit.Uwp.UI.Controls.Design.Common;
+using Microsoft.Windows.Design;
+using Microsoft.Windows.Design.Metadata;
+using Microsoft.Windows.Design.PropertyEditing;
+using System.ComponentModel;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal class TabViewMetadata : AttributeTableBuilder
+ {
+ public TabViewMetadata()
+ : base()
+ {
+ AddCallback(typeof(Microsoft.Toolkit.Uwp.UI.Controls.TabView),
+ b =>
+ {
+ // Layout
+ b.AddCustomAttributes(nameof(TabView.TabWidthBehavior), new CategoryAttribute(Properties.Resources.CategoryLayout));
+ b.AddCustomAttributes(nameof(TabView.SelectedTabWidth), new CategoryAttribute(Properties.Resources.CategoryLayout));
+ b.AddCustomAttributes(nameof(TabView.IsCloseButtonOverlay), new CategoryAttribute(Properties.Resources.CategoryLayout));
+
+ // Interactions
+ b.AddCustomAttributes(nameof(TabView.CanCloseTabs), new CategoryAttribute(Properties.Resources.CategoryCommon));
+
+ // Templates
+ b.AddCustomAttributes(nameof(TabView.ItemHeaderTemplate),
+ new CategoryAttribute(Properties.Resources.CategoryCommon),
+ new EditorBrowsableAttribute(EditorBrowsableState.Advanced)
+ );
+ b.AddCustomAttributes(nameof(TabView.TabActionHeader), new CategoryAttribute(Properties.Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(TabView.TabActionHeaderTemplate),
+ new CategoryAttribute(Properties.Resources.CategoryCommon),
+ new EditorBrowsableAttribute(EditorBrowsableState.Advanced)
+ );
+ b.AddCustomAttributes(nameof(TabView.TabEndHeader), new CategoryAttribute(Properties.Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(TabView.TabEndHeaderTemplate),
+ new CategoryAttribute(Properties.Resources.CategoryCommon),
+ new EditorBrowsableAttribute(EditorBrowsableState.Advanced)
+ );
+ b.AddCustomAttributes(nameof(TabView.TabStartHeader), new CategoryAttribute(Properties.Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(TabView.TabStartHeaderTemplate),
+ new CategoryAttribute(Properties.Resources.CategoryCommon),
+ new EditorBrowsableAttribute(EditorBrowsableState.Advanced)
+ );
+ b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
+ }
+ );
+ }
+ }
+}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/GridSplitter/GridSplitter.cs b/Microsoft.Toolkit.Uwp.UI.Controls/GridSplitter/GridSplitter.cs
index 350ac4705d8..0a7b44d9989 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/GridSplitter/GridSplitter.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/GridSplitter/GridSplitter.cs
@@ -162,6 +162,7 @@ private RowDefinition SiblingRow
public GridSplitter()
{
DefaultStyleKey = typeof(GridSplitter);
+ Loaded += GridSplitter_Loaded;
}
///
@@ -178,6 +179,8 @@ protected override void OnApplyTemplate()
ManipulationStarted -= GridSplitter_ManipulationStarted;
ManipulationCompleted -= GridSplitter_ManipulationCompleted;
+ _hoverWrapper?.UnhookEvents();
+
// Register Events
Loaded += GridSplitter_Loaded;
PointerEntered += GridSplitter_PointerEntered;
@@ -187,7 +190,7 @@ protected override void OnApplyTemplate()
ManipulationStarted += GridSplitter_ManipulationStarted;
ManipulationCompleted += GridSplitter_ManipulationCompleted;
- _hoverWrapper?.UnhookEvents();
+ _hoverWrapper?.UpdateHoverElement(Element);
ManipulationMode = ManipulationModes.TranslateX | ManipulationModes.TranslateY;
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/HeaderedContentControl/HeaderedContentControl.cs b/Microsoft.Toolkit.Uwp.UI.Controls/HeaderedContentControl/HeaderedContentControl.cs
index 9d6d4fa9c31..cd3dab1565b 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/HeaderedContentControl/HeaderedContentControl.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/HeaderedContentControl/HeaderedContentControl.cs
@@ -12,6 +12,8 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
///
public class HeaderedContentControl : ContentControl
{
+ private const string PartHeaderPresenter = "HeaderPresenter";
+
///
/// Initializes a new instance of the class.
///
@@ -38,12 +40,34 @@ public HeaderedContentControl()
typeof(HeaderedContentControl),
new PropertyMetadata(null));
+ ///
+ /// Identifies the dependency property.
+ ///
+ public static readonly DependencyProperty OrientationProperty = DependencyProperty.Register(
+ nameof(Orientation),
+ typeof(Orientation),
+ typeof(HeaderedContentControl),
+ new PropertyMetadata(Orientation.Vertical, OnOrientationChanged));
+
+ ///
+ /// Gets or sets the used for the header.
+ ///
+ ///
+ /// If set to the header will be above the content.
+ /// If set to the header will be to the left of the content.
+ ///
+ public Orientation Orientation
+ {
+ get { return (Orientation)GetValue(OrientationProperty); }
+ set { SetValue(OrientationProperty, value); }
+ }
+
///
/// Gets or sets the data used for the header of each control.
///
public object Header
{
- get { return (object)GetValue(HeaderProperty); }
+ get { return GetValue(HeaderProperty); }
set { SetValue(HeaderProperty, value); }
}
@@ -56,6 +80,14 @@ public DataTemplate HeaderTemplate
set { SetValue(HeaderTemplateProperty, value); }
}
+ ///
+ protected override void OnApplyTemplate()
+ {
+ base.OnApplyTemplate();
+
+ SetHeaderVisibility();
+ }
+
///
/// Called when the property changes.
///
@@ -65,10 +97,32 @@ protected virtual void OnHeaderChanged(object oldValue, object newValue)
{
}
+ private static void OnOrientationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ var control = (HeaderedContentControl)d;
+
+ var orientation = control.Orientation == Orientation.Vertical
+ ? nameof(Orientation.Vertical)
+ : nameof(Orientation.Horizontal);
+
+ VisualStateManager.GoToState(control, orientation, true);
+ }
+
private static void OnHeaderChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var control = (HeaderedContentControl)d;
+ control.SetHeaderVisibility();
control.OnHeaderChanged(e.OldValue, e.NewValue);
}
+
+ private void SetHeaderVisibility()
+ {
+ if (GetTemplateChild(PartHeaderPresenter) is FrameworkElement headerPresenter)
+ {
+ headerPresenter.Visibility = Header != null
+ ? Visibility.Visible
+ : Visibility.Collapsed;
+ }
+ }
}
}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/HeaderedContentControl/HeaderedContentControl.xaml b/Microsoft.Toolkit.Uwp.UI.Controls/HeaderedContentControl/HeaderedContentControl.xaml
index 3f491dea985..2c713168efc 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/HeaderedContentControl/HeaderedContentControl.xaml
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/HeaderedContentControl/HeaderedContentControl.xaml
@@ -13,8 +13,33 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/HeaderedItemsControl/HeaderedItemsControl.cs b/Microsoft.Toolkit.Uwp.UI.Controls/HeaderedItemsControl/HeaderedItemsControl.cs
index fd4bd0f5847..d854c1804ec 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/HeaderedItemsControl/HeaderedItemsControl.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/HeaderedItemsControl/HeaderedItemsControl.cs
@@ -38,12 +38,21 @@ public HeaderedItemsControl()
typeof(HeaderedItemsControl),
new PropertyMetadata(null));
+ ///
+ /// Identifies the dependency property.
+ ///
+ public static readonly DependencyProperty OrientationProperty = DependencyProperty.Register(
+ nameof(Orientation),
+ typeof(Orientation),
+ typeof(HeaderedItemsControl),
+ new PropertyMetadata(Orientation.Vertical));
+
///
/// Gets or sets the data used for the header of each control.
///
public object Header
{
- get { return (object)GetValue(HeaderProperty); }
+ get { return GetValue(HeaderProperty); }
set { SetValue(HeaderProperty, value); }
}
@@ -56,6 +65,19 @@ public DataTemplate HeaderTemplate
set { SetValue(HeaderTemplateProperty, value); }
}
+ ///
+ /// Gets or sets the used for the header.
+ ///
+ ///
+ /// If set to the header will be above the content.
+ /// If set to the header will be to the left of the content.
+ ///
+ public Orientation Orientation
+ {
+ get { return (Orientation)GetValue(OrientationProperty); }
+ set { SetValue(OrientationProperty, value); }
+ }
+
///
/// Called when the property changes.
///
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/HeaderedItemsControl/HeaderedItemsControl.xaml b/Microsoft.Toolkit.Uwp.UI.Controls/HeaderedItemsControl/HeaderedItemsControl.xaml
index 9442c40346a..dcb57cbfd27 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/HeaderedItemsControl/HeaderedItemsControl.xaml
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/HeaderedItemsControl/HeaderedItemsControl.xaml
@@ -7,7 +7,7 @@
-
+
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/HeaderedTextBlock/HeaderedTextBlock.cs b/Microsoft.Toolkit.Uwp.UI.Controls/HeaderedTextBlock/HeaderedTextBlock.cs
index 873308a8a78..b30dfea1d3d 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/HeaderedTextBlock/HeaderedTextBlock.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/HeaderedTextBlock/HeaderedTextBlock.cs
@@ -2,6 +2,7 @@
// 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;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Markup;
@@ -13,6 +14,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
///
[TemplatePart(Name = "HeaderContentPresenter", Type = typeof(ContentPresenter))]
[ContentProperty(Name = nameof(Inlines))]
+ [Obsolete("The HeaderedTextBlock has been replaced with the more generic HeaderedContentControl.")]
public partial class HeaderedTextBlock : Control
{
private ContentPresenter _headerContentPresenter;
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification/InAppNotification.Events.cs b/Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification/InAppNotification.Events.cs
index 05dd9d6b390..35dc848e240 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification/InAppNotification.Events.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification/InAppNotification.Events.cs
@@ -39,8 +39,8 @@ private void DismissButton_Click(object sender, RoutedEventArgs e)
private void DismissTimer_Tick(object sender, object e)
{
- Dismiss(InAppNotificationDismissKind.Timeout);
_dismissTimer.Stop();
+ Dismiss(InAppNotificationDismissKind.Timeout);
}
private void OpenAnimationTimer_Tick(object sender, object e)
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification/InAppNotification.xaml b/Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification/InAppNotification.xaml
index b0e0a0ae557..d40f196017c 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification/InAppNotification.xaml
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification/InAppNotification.xaml
@@ -1,8 +1,9 @@
-
+
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification/Styles/MSEdgeNotificationStyle.xaml b/Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification/Styles/MSEdgeNotificationStyle.xaml
index 0155c5d25bc..120368a79f5 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification/Styles/MSEdgeNotificationStyle.xaml
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification/Styles/MSEdgeNotificationStyle.xaml
@@ -3,46 +3,60 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Microsoft.Toolkit.Uwp.UI.Controls">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/RadialGauge/RadialGauge.cs b/Microsoft.Toolkit.Uwp.UI.Controls/RadialGauge/RadialGauge.cs
index 93d455b7faa..5341d97e71f 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/RadialGauge/RadialGauge.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/RadialGauge/RadialGauge.cs
@@ -210,13 +210,14 @@ private void ThemeListener_ThemeChanged(ThemeListener sender)
private void RadialGauge_KeyDown(object sender, KeyRoutedEventArgs e)
{
- var step = 1;
+ double step = 1;
var ctrl = Window.Current.CoreWindow.GetKeyState(VirtualKey.Control);
if (ctrl.HasFlag(CoreVirtualKeyStates.Down))
{
step = 5;
}
+ step = Math.Max(StepSize, step);
if (e.Key == VirtualKey.Left)
{
Value = Math.Max(Minimum, Value - step);
@@ -796,7 +797,7 @@ private void SetGaugeValueFromPoint(Point p)
return;
}
- Value = value;
+ Value = RoundToMultiple(value, StepSize);
}
private Point ScalePoint(double angle, double middleOfScale)
@@ -831,6 +832,11 @@ private double Mod(double number, double divider)
private double RoundToMultiple(double number, double multiple)
{
double modulo = number % multiple;
+ if (double.IsNaN(modulo))
+ {
+ return number;
+ }
+
if ((multiple - modulo) <= modulo)
{
modulo = multiple - modulo;
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/RotatorTile/RotatorTile.cs b/Microsoft.Toolkit.Uwp.UI.Controls/RotatorTile/RotatorTile.cs
index c9224f37fcf..6b66d44974f 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/RotatorTile/RotatorTile.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/RotatorTile/RotatorTile.cs
@@ -98,6 +98,10 @@ protected override void OnApplyTemplate()
_nextElement = GetTemplateChild(NextPartName) as FrameworkElement;
_translate = GetTemplateChild(TranslatePartName) as TranslateTransform;
_stackPanel = GetTemplateChild(StackPartName) as StackPanel;
+
+ // set the correct defaults for translate transform
+ UpdateTranslateXY();
+
if (_stackPanel != null)
{
if (Direction == RotateDirection.Down || Direction == RotateDirection.Right)
@@ -144,9 +148,6 @@ private void RotatorTile_SizeChanged(object sender, SizeChangedEventArgs e)
private void RotatorTile_Loaded(object sender, RoutedEventArgs e)
{
- // set the correct defaults for translate transform
- UpdateTranslateXY();
-
// Start timer after control has loaded
_timer?.Start();
}
@@ -272,6 +273,11 @@ private void RotateToNextItem()
private void UpdateTranslateXY()
{
+ if (_translate == null)
+ {
+ return;
+ }
+
if (Direction == RotateDirection.Left || Direction == RotateDirection.Up)
{
_translate.X = _translate.Y = 0;
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabClosingEventArgs.cs b/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabClosingEventArgs.cs
new file mode 100644
index 00000000000..dabb94ed9ad
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabClosingEventArgs.cs
@@ -0,0 +1,40 @@
+// 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.UI.Controls
+{
+ ///
+ /// Event arguments for event.
+ ///
+ public class TabClosingEventArgs : EventArgs
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Item being closed.
+ /// container being closed.
+ public TabClosingEventArgs(object item, TabViewItem tab)
+ {
+ Item = item;
+ Tab = tab;
+ }
+
+ ///
+ /// Gets the Item being closed.
+ ///
+ public object Item { get; private set; }
+
+ ///
+ /// Gets the Tab being closed.
+ ///
+ public TabViewItem Tab { get; private set; }
+
+ ///
+ /// Gets or sets a value indicating whether the notification should be closed.
+ ///
+ public bool Cancel { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabDraggedOutsideEventArgs.cs b/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabDraggedOutsideEventArgs.cs
new file mode 100644
index 00000000000..dcf351aab9b
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabDraggedOutsideEventArgs.cs
@@ -0,0 +1,35 @@
+// 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.UI.Controls
+{
+ ///
+ /// A class used by the TabDraggedOutside Event
+ ///
+ public class TabDraggedOutsideEventArgs : EventArgs
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// data context of element dragged
+ /// container being dragged.
+ public TabDraggedOutsideEventArgs(object item, TabViewItem tab)
+ {
+ Item = item;
+ Tab = tab;
+ }
+
+ ///
+ /// Gets or sets the Item/Data Context of the item being dragged outside of the .
+ ///
+ public object Item { get; set; }
+
+ ///
+ /// Gets the Tab being dragged outside of the .
+ ///
+ public TabViewItem Tab { get; private set; }
+ }
+}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabView.HeaderLayout.cs b/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabView.HeaderLayout.cs
new file mode 100644
index 00000000000..16885700b35
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabView.HeaderLayout.cs
@@ -0,0 +1,221 @@
+// 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.Linq;
+using Windows.UI.Xaml;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls
+{
+ ///
+ /// TabView methods related to calculating the width of the Headers.
+ ///
+ public partial class TabView
+ {
+ // Attached property for storing widths of tabs if set by other means during layout.
+ private static double GetOriginalWidth(TabViewItem obj)
+ {
+ return (double)obj.GetValue(OriginalWidthProperty);
+ }
+
+ private static void SetOriginalWidth(TabViewItem obj, double value)
+ {
+ obj.SetValue(OriginalWidthProperty, value);
+ }
+
+ // Using a DependencyProperty as the backing store for MyProperty. This enables animation, styling, binding, etc...
+ private static readonly DependencyProperty OriginalWidthProperty =
+ DependencyProperty.RegisterAttached("OriginalWidth", typeof(double), typeof(TabView), new PropertyMetadata(null));
+
+ private static void OnLayoutEffectingPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
+ {
+ var tabview = sender as TabView;
+ if (tabview != null && tabview._hasLoaded)
+ {
+ tabview.TabView_SizeChanged(tabview, null);
+ }
+ }
+
+ private void TabView_SizeChanged(object sender, SizeChangedEventArgs e)
+ {
+ // We need to do this calculation here in Size Changed as the
+ // Columns don't have their Actual Size calculated in Measure or Arrange.
+ if (_hasLoaded && _tabViewContainer != null)
+ {
+ // Look for our special columns to calculate size of other 'stuff'
+ var taken = _tabViewContainer.ColumnDefinitions.Sum(cd => GetIgnoreColumn(cd) ? 0 : cd.ActualWidth);
+
+ // Get the column we want to work on for available space
+ var tabc = _tabViewContainer.ColumnDefinitions.FirstOrDefault(cd => GetConstrainColumn(cd));
+ if (tabc != null)
+ {
+ var available = ActualWidth - taken;
+ var required = 0.0;
+ var mintabwidth = double.MaxValue;
+
+ if (TabWidthBehavior == TabWidthMode.Actual)
+ {
+ if (_tabScroller != null)
+ {
+ // If we have a scroll container, get its size.
+ required = _tabScroller.ExtentWidth;
+ }
+
+ // Restore original widths
+ foreach (var item in Items)
+ {
+ var tab = ContainerFromItem(item) as TabViewItem;
+ if (tab == null)
+ {
+ continue; // container not generated yet
+ }
+
+ if (tab.ReadLocalValue(OriginalWidthProperty) != DependencyProperty.UnsetValue)
+ {
+ tab.Width = GetOriginalWidth(tab);
+ }
+ }
+ }
+ else if (available > 0)
+ {
+ // Calculate the width for each tab from the provider and determine how much space they take.
+ foreach (var item in Items)
+ {
+ var tab = ContainerFromItem(item) as TabViewItem;
+ if (tab == null)
+ {
+ continue; // container not generated yet
+ }
+
+ mintabwidth = Math.Min(mintabwidth, tab.MinWidth);
+
+ double width = double.NaN;
+
+ switch (TabWidthBehavior)
+ {
+ case TabWidthMode.Equal:
+ width = ProvideEqualWidth(tab, item, available);
+ break;
+ case TabWidthMode.Compact:
+ width = ProvideCompactWidth(tab, item, available);
+ break;
+ }
+
+ if (tab.ReadLocalValue(OriginalWidthProperty) == DependencyProperty.UnsetValue)
+ {
+ SetOriginalWidth(tab, tab.Width);
+ }
+
+ if (width > double.Epsilon)
+ {
+ tab.Width = width;
+ required += Math.Max(Math.Min(width, tab.MaxWidth), tab.MinWidth);
+ }
+ else
+ {
+ tab.Width = GetOriginalWidth(tab);
+ required += tab.ActualWidth;
+ }
+ }
+ }
+ else
+ {
+ // Fix negative bounds.
+ available = 0.0;
+
+ // Still need to determine a 'minimum' width (if available)
+ // TODO: Consolidate this logic with above better?
+ foreach (var item in Items)
+ {
+ var tab = ContainerFromItem(item) as TabViewItem;
+ if (tab == null)
+ {
+ continue; // container not generated yet
+ }
+
+ mintabwidth = Math.Min(mintabwidth, tab.MinWidth);
+ }
+ }
+
+ if (!(mintabwidth < double.MaxValue))
+ {
+ mintabwidth = 0.0; // No Containers, no visual, 0 size.
+ }
+
+ if (available > mintabwidth)
+ {
+ // Constrain the column based on our required and available space
+ tabc.MaxWidth = available;
+ }
+
+ //// TODO: If it's less, should we move the selected tab to only be the one shown by default?
+
+ if (available <= mintabwidth || Math.Abs(available - mintabwidth) < double.Epsilon)
+ {
+ tabc.Width = new GridLength(mintabwidth);
+ }
+ else if (required >= available)
+ {
+ // Fix size as we don't have enough space for all the tabs.
+ tabc.Width = new GridLength(available);
+ }
+ else
+ {
+ // We haven't filled up our space, so we want to expand to take as much as needed.
+ tabc.Width = GridLength.Auto;
+ }
+ }
+ }
+ }
+
+ private double ProvideEqualWidth(TabViewItem tab, object item, double availableWidth)
+ {
+ if (double.IsNaN(SelectedTabWidth))
+ {
+ if (Items.Count <= 1)
+ {
+ return availableWidth;
+ }
+
+ return Math.Max(tab.MinWidth, availableWidth / Items.Count);
+ }
+ else if (Items.Count() <= 1)
+ {
+ // Default case of a single tab, make it full size.
+ return Math.Min(SelectedTabWidth, availableWidth);
+ }
+ else
+ {
+ var width = (availableWidth - SelectedTabWidth) / (Items.Count - 1);
+
+ // Constrain between Min and Selected (Max)
+ if (width < tab.MinWidth)
+ {
+ width = tab.MinWidth;
+ }
+ else if (width > SelectedTabWidth)
+ {
+ width = SelectedTabWidth;
+ }
+
+ // If it's selected make it full size, otherwise whatever the size should be.
+ return tab.IsSelected
+ ? Math.Min(SelectedTabWidth, availableWidth)
+ : width;
+ }
+ }
+
+ private double ProvideCompactWidth(TabViewItem tab, object item, double availableWidth)
+ {
+ // If we're selected and have a value for that, then just return that.
+ if (tab.IsSelected && !double.IsNaN(SelectedTabWidth))
+ {
+ return SelectedTabWidth;
+ }
+
+ // Otherwise use min size.
+ return tab.MinWidth;
+ }
+ }
+}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabView.ItemSources.cs b/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabView.ItemSources.cs
new file mode 100644
index 00000000000..61f61623b6f
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabView.ItemSources.cs
@@ -0,0 +1,115 @@
+// 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 Windows.Foundation.Collections;
+using Windows.UI.Xaml;
+using Windows.UI.Xaml.Controls.Primitives;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls
+{
+ ///
+ /// TabView methods related to tracking Items and ItemsSource changes.
+ ///
+ public partial class TabView
+ {
+ // Temporary tracking of previous collections for removing events.
+ private MethodInfo _removeItemsSourceMethod;
+
+ ///
+ protected override void OnItemsChanged(object e)
+ {
+ IVectorChangedEventArgs args = (IVectorChangedEventArgs)e;
+
+ base.OnItemsChanged(e);
+
+ if (args.CollectionChange == CollectionChange.ItemRemoved && SelectedIndex == -1)
+ {
+ // If we remove the selected item we should select the previous item
+ int startIndex = (int)args.Index + 1;
+ if (startIndex > Items.Count)
+ {
+ startIndex = 0;
+ }
+
+ SelectedIndex = FindNextTabIndex(startIndex, -1);
+ }
+
+ // Update Sizing (in case there are less items now)
+ TabView_SizeChanged(this, null);
+ }
+
+ private void ItemContainerGenerator_ItemsChanged(object sender, ItemsChangedEventArgs e)
+ {
+ var action = (CollectionChange)e.Action;
+ if (action == CollectionChange.Reset)
+ {
+ // Reset collection to reload later.
+ _hasLoaded = false;
+ }
+ }
+
+ private void SetInitialSelection()
+ {
+ if (SelectedItem == null)
+ {
+ // If we have an index, but didn't get the selection, make the selection
+ if (SelectedIndex >= 0 && SelectedIndex < Items.Count)
+ {
+ SelectedItem = Items[SelectedIndex];
+ }
+
+ // Otherwise, select the first item by default
+ else if (Items.Count >= 1)
+ {
+ SelectedItem = Items[0];
+ }
+ }
+ }
+
+ // Finds the next visible & enabled tab index.
+ private int FindNextTabIndex(int startIndex, int direction)
+ {
+ int index = startIndex;
+ if (direction != 0)
+ {
+ for (int i = 0; i < Items.Count; i++)
+ {
+ index += direction;
+
+ if (index >= Items.Count)
+ {
+ index = 0;
+ }
+ else if (index < 0)
+ {
+ index = Items.Count - 1;
+ }
+
+ var tabItem = ContainerFromIndex(index) as TabViewItem;
+ if (tabItem != null && tabItem.IsEnabled && tabItem.Visibility == Visibility.Visible)
+ {
+ break;
+ }
+ }
+ }
+
+ return index;
+ }
+
+ private void ItemsSource_PropertyChanged(DependencyObject sender, DependencyProperty dp)
+ {
+ // Use reflection to store a 'Remove' method of any possible collection in ItemsSource
+ // Cache for efficiency later.
+ if (ItemsSource != null)
+ {
+ _removeItemsSourceMethod = ItemsSource.GetType().GetMethod("Remove");
+ }
+ else
+ {
+ _removeItemsSourceMethod = null;
+ }
+ }
+ }
+}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabView.Properties.cs b/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabView.Properties.cs
new file mode 100644
index 00000000000..5d33b33f1cc
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabView.Properties.cs
@@ -0,0 +1,245 @@
+// 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;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls
+{
+ ///
+ /// TabView properties.
+ ///
+ public partial class TabView
+ {
+ ///
+ /// Gets or sets the content to appear to the left or above the tab strip.
+ ///
+ public object TabStartHeader
+ {
+ get { return (object)GetValue(TabStartHeaderProperty); }
+ set { SetValue(TabStartHeaderProperty, value); }
+ }
+
+ ///
+ /// Identifies the dependency property.
+ ///
+ /// The identifier for the dependency property.
+ public static readonly DependencyProperty TabStartHeaderProperty =
+ DependencyProperty.Register(nameof(TabStartHeader), typeof(object), typeof(TabView), new PropertyMetadata(null, OnLayoutEffectingPropertyChanged));
+
+ ///
+ /// Gets or sets the for the .
+ ///
+ public DataTemplate TabStartHeaderTemplate
+ {
+ get { return (DataTemplate)GetValue(TabStartHeaderTemplateProperty); }
+ set { SetValue(TabStartHeaderTemplateProperty, value); }
+ }
+
+ ///
+ /// Identifies the dependency property.
+ ///
+ /// The identifier for the dependency property.
+ public static readonly DependencyProperty TabStartHeaderTemplateProperty =
+ DependencyProperty.Register(nameof(TabStartHeaderTemplate), typeof(DataTemplate), typeof(TabView), new PropertyMetadata(null, OnLayoutEffectingPropertyChanged));
+
+ ///
+ /// Gets or sets the content to appear next to the tab strip.
+ ///
+ public object TabActionHeader
+ {
+ get { return (object)GetValue(TabActionHeaderProperty); }
+ set { SetValue(TabActionHeaderProperty, value); }
+ }
+
+ ///
+ /// Identifies the dependency property.
+ ///
+ /// The identifier for the dependency property.
+ public static readonly DependencyProperty TabActionHeaderProperty =
+ DependencyProperty.Register(nameof(TabActionHeader), typeof(object), typeof(TabView), new PropertyMetadata(null, OnLayoutEffectingPropertyChanged));
+
+ ///
+ /// Gets or sets the for the .
+ ///
+ public DataTemplate TabActionHeaderTemplate
+ {
+ get { return (DataTemplate)GetValue(TabActionHeaderTemplateProperty); }
+ set { SetValue(TabActionHeaderTemplateProperty, value); }
+ }
+
+ ///
+ /// Identifies the dependency property.
+ ///
+ /// The identifier for the dependency property.
+ public static readonly DependencyProperty TabActionHeaderTemplateProperty =
+ DependencyProperty.Register(nameof(TabActionHeaderTemplate), typeof(DataTemplate), typeof(TabView), new PropertyMetadata(null, OnLayoutEffectingPropertyChanged));
+
+ ///
+ /// Gets or sets the content to appear to the right or below the tab strip.
+ ///
+ public object TabEndHeader
+ {
+ get { return (object)GetValue(TabEndHeaderProperty); }
+ set { SetValue(TabEndHeaderProperty, value); }
+ }
+
+ ///
+ /// Identifies the dependency property.
+ ///
+ /// The identifier for the dependency property.
+ public static readonly DependencyProperty TabEndHeaderProperty =
+ DependencyProperty.Register(nameof(TabEndHeader), typeof(object), typeof(TabView), new PropertyMetadata(null, OnLayoutEffectingPropertyChanged));
+
+ ///
+ /// Gets or sets the for the .
+ ///
+ public DataTemplate TabEndHeaderTemplate
+ {
+ get { return (DataTemplate)GetValue(TabEndHeaderTemplateProperty); }
+ set { SetValue(TabEndHeaderTemplateProperty, value); }
+ }
+
+ ///
+ /// Identifies the dependency property.
+ ///
+ /// The identifier for the dependency property.
+ public static readonly DependencyProperty TabEndHeaderTemplateProperty =
+ DependencyProperty.Register(nameof(TabEndHeaderTemplate), typeof(DataTemplate), typeof(TabView), new PropertyMetadata(null, OnLayoutEffectingPropertyChanged));
+
+ ///
+ /// Gets or sets the default for the .
+ ///
+ public DataTemplate ItemHeaderTemplate
+ {
+ get { return (DataTemplate)GetValue(ItemHeaderTemplateProperty); }
+ set { SetValue(ItemHeaderTemplateProperty, value); }
+ }
+
+ ///
+ /// Identifies the dependency property.
+ ///
+ /// The identifier for the dependency property.
+ public static readonly DependencyProperty ItemHeaderTemplateProperty =
+ DependencyProperty.Register(nameof(ItemHeaderTemplate), typeof(DataTemplate), typeof(TabView), new PropertyMetadata(null, OnLayoutEffectingPropertyChanged));
+
+ ///
+ /// Gets or sets a value indicating whether by default a Tab can be closed or not if no value to is provided.
+ ///
+ public bool CanCloseTabs
+ {
+ get { return (bool)GetValue(CanCloseTabsProperty); }
+ set { SetValue(CanCloseTabsProperty, value); }
+ }
+
+ ///
+ /// Identifies the dependency property.
+ ///
+ /// The identifier for the dependency property.
+ public static readonly DependencyProperty CanCloseTabsProperty =
+ DependencyProperty.Register(nameof(CanCloseTabs), typeof(bool), typeof(TabView), new PropertyMetadata(false, OnLayoutEffectingPropertyChanged));
+
+ ///
+ /// Gets or sets a value indicating whether a Close Button should be included in layout calculations.
+ ///
+ public bool IsCloseButtonOverlay
+ {
+ get { return (bool)GetValue(IsCloseButtonOverlayProperty); }
+ set { SetValue(IsCloseButtonOverlayProperty, value); }
+ }
+
+ ///
+ /// Identifies the dependency property.
+ ///
+ /// The identifier for the dependency property.
+ public static readonly DependencyProperty IsCloseButtonOverlayProperty =
+ DependencyProperty.Register(nameof(IsCloseButtonOverlay), typeof(bool), typeof(TabView), new PropertyMetadata(false, OnLayoutEffectingPropertyChanged));
+
+ ///
+ /// Gets or sets a value indicating the size of the selected tab. By default this is set to Auto and the selected tab size doesn't change.
+ ///
+ public double SelectedTabWidth
+ {
+ get { return (double)GetValue(SelectedTabWidthProperty); }
+ set { SetValue(SelectedTabWidthProperty, value); }
+ }
+
+ ///
+ /// Identifies the dependency property.
+ ///
+ /// The identifier for the dependency property.
+ public static readonly DependencyProperty SelectedTabWidthProperty =
+ DependencyProperty.Register(nameof(SelectedTabWidth), typeof(double), typeof(TabView), new PropertyMetadata(double.NaN, OnLayoutEffectingPropertyChanged));
+
+ ///
+ /// Gets or sets the current which determins how tab headers' width behave.
+ ///
+ public TabWidthMode TabWidthBehavior
+ {
+ get { return (TabWidthMode)GetValue(TabWidthBehaviorProperty); }
+ set { SetValue(TabWidthBehaviorProperty, value); }
+ }
+
+ ///
+ /// Identifies the dependency property.
+ ///
+ /// The identifier for the dependency property.
+ public static readonly DependencyProperty TabWidthBehaviorProperty =
+ DependencyProperty.Register(nameof(TabWidthBehavior), typeof(TabWidthMode), typeof(TabView), new PropertyMetadata(TabWidthMode.Actual, OnLayoutEffectingPropertyChanged));
+
+ ///
+ /// Gets the attached property value to indicate if this grid column should be ignored when calculating header sizes.
+ ///
+ /// Grid Column.
+ /// Boolean indicating if this column is ignored by TabViewHeader logic.
+ public static bool GetIgnoreColumn(ColumnDefinition obj)
+ {
+ return (bool)obj.GetValue(IgnoreColumnProperty);
+ }
+
+ ///
+ /// Sets the attached property value for
+ ///
+ /// Grid Column.
+ /// Boolean value
+ public static void SetIgnoreColumn(ColumnDefinition obj, bool value)
+ {
+ obj.SetValue(IgnoreColumnProperty, value);
+ }
+
+ ///
+ /// Identifies the attached property.
+ ///
+ /// The identifier for the IgnoreColumn attached property.
+ public static readonly DependencyProperty IgnoreColumnProperty =
+ DependencyProperty.RegisterAttached("IgnoreColumn", typeof(bool), typeof(TabView), new PropertyMetadata(false));
+
+ ///
+ /// Gets the attached value indicating this column should be restricted for the headers.
+ ///
+ /// Grid Column.
+ /// True if this column should be constrained.
+ public static bool GetConstrainColumn(ColumnDefinition obj)
+ {
+ return (bool)obj.GetValue(ConstrainColumnProperty);
+ }
+
+ ///
+ /// Sets the attached property value for the
+ ///
+ /// Grid Column.
+ /// Boolean value.
+ public static void SetConstrainColumn(ColumnDefinition obj, bool value)
+ {
+ obj.SetValue(ConstrainColumnProperty, value);
+ }
+
+ ///
+ /// Identifies the attached property.
+ ///
+ /// The identifier for the ConstrainColumn attached property.
+ public static readonly DependencyProperty ConstrainColumnProperty =
+ DependencyProperty.RegisterAttached("ConstrainColumn", typeof(bool), typeof(TabView), new PropertyMetadata(false));
+ }
+}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabView.cs b/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabView.cs
new file mode 100644
index 00000000000..89a6a0c6e89
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabView.cs
@@ -0,0 +1,316 @@
+// 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.Linq;
+using Microsoft.Toolkit.Uwp.UI.Extensions;
+using Windows.ApplicationModel.DataTransfer;
+using Windows.UI.Xaml;
+using Windows.UI.Xaml.Controls;
+using Windows.UI.Xaml.Controls.Primitives;
+using Windows.UI.Xaml.Data;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls
+{
+ ///
+ /// TabView is a control for displaying a set of tabs and their content.
+ ///
+ [TemplatePart(Name = TabContentPresenterName, Type = typeof(ContentPresenter))]
+ [TemplatePart(Name = TabViewContainerName, Type = typeof(Grid))]
+ [TemplatePart(Name = TabsItemsPresenterName, Type = typeof(ItemsPresenter))]
+ [TemplatePart(Name = TabsScrollViewerName, Type = typeof(ScrollViewer))]
+ [TemplatePart(Name = TabsScrollBackButtonName, Type = typeof(ButtonBase))]
+ [TemplatePart(Name = TabsScrollForwardButtonName, Type = typeof(ButtonBase))]
+ public partial class TabView : ListViewBase
+ {
+ private const int ScrollAmount = 50; // TODO: Should this be based on TabWidthMode
+
+ private const string TabContentPresenterName = "TabContentPresenter";
+ private const string TabViewContainerName = "TabViewContainer";
+ private const string TabsItemsPresenterName = "TabsItemsPresenter";
+ private const string TabsScrollViewerName = "ScrollViewer";
+ private const string TabsScrollBackButtonName = "ScrollBackButton";
+ private const string TabsScrollForwardButtonName = "ScrollForwardButton";
+
+ private ContentPresenter _tabContentPresenter;
+ private Grid _tabViewContainer;
+ private ItemsPresenter _tabItemsPresenter;
+ private ScrollViewer _tabScroller;
+ private ButtonBase _tabScrollBackButton;
+ private ButtonBase _tabScrollForwardButton;
+
+ private bool _hasLoaded;
+ private bool _isDragging;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public TabView()
+ {
+ DefaultStyleKey = typeof(TabView);
+
+ // Container Generation Hooks
+ RegisterPropertyChangedCallback(ItemsSourceProperty, ItemsSource_PropertyChanged);
+ ItemContainerGenerator.ItemsChanged += ItemContainerGenerator_ItemsChanged;
+
+ // Drag and Layout Hooks
+ DragItemsStarting += TabView_DragItemsStarting;
+ DragItemsCompleted += TabView_DragItemsCompleted;
+ SizeChanged += TabView_SizeChanged;
+
+ // Selection Hook
+ SelectionChanged += TabView_SelectionChanged;
+ }
+
+ ///
+ /// Occurs when a tab is dragged by the user outside of the . Generally, this paradigm is used to create a new-window with the torn-off tab.
+ /// The creation and handling of the new-window is left to the app's developer.
+ ///
+ public event EventHandler TabDraggedOutside;
+
+ ///
+ /// Occurs when a tab's Close button is clicked. Set to true to prevent automatic Tab Closure.
+ ///
+ public event EventHandler TabClosing;
+
+ ///
+ protected override DependencyObject GetContainerForItemOverride() => new TabViewItem();
+
+ ///
+ protected override bool IsItemItsOwnContainerOverride(object item)
+ {
+ return item is TabViewItem;
+ }
+
+ ///
+ protected override void OnApplyTemplate()
+ {
+ base.OnApplyTemplate();
+
+ if (_tabItemsPresenter != null)
+ {
+ _tabItemsPresenter.SizeChanged -= TabView_SizeChanged;
+ }
+
+ if (_tabScroller != null)
+ {
+ _tabScroller.Loaded -= ScrollViewer_Loaded;
+ }
+
+ _tabContentPresenter = GetTemplateChild(TabContentPresenterName) as ContentPresenter;
+ _tabViewContainer = GetTemplateChild(TabViewContainerName) as Grid;
+ _tabItemsPresenter = GetTemplateChild(TabsItemsPresenterName) as ItemsPresenter;
+ _tabScroller = GetTemplateChild(TabsScrollViewerName) as ScrollViewer;
+
+ if (_tabItemsPresenter != null)
+ {
+ _tabItemsPresenter.SizeChanged += TabView_SizeChanged;
+ }
+
+ if (_tabScroller != null)
+ {
+ _tabScroller.Loaded += ScrollViewer_Loaded;
+ }
+ }
+
+ private void ScrollViewer_Loaded(object sender, RoutedEventArgs e)
+ {
+ _tabScroller.Loaded -= ScrollViewer_Loaded;
+
+ if (_tabScrollBackButton != null)
+ {
+ _tabScrollBackButton.Click -= ScrollTabBackButton_Click;
+ }
+
+ if (_tabScrollForwardButton != null)
+ {
+ _tabScrollForwardButton.Click -= ScrollTabForwardButton_Click;
+ }
+
+ _tabScrollBackButton = _tabScroller.FindDescendantByName(TabsScrollBackButtonName) as ButtonBase;
+ _tabScrollForwardButton = _tabScroller.FindDescendantByName(TabsScrollForwardButtonName) as ButtonBase;
+
+ if (_tabScrollBackButton != null)
+ {
+ _tabScrollBackButton.Click += ScrollTabBackButton_Click;
+ }
+
+ if (_tabScrollForwardButton != null)
+ {
+ _tabScrollForwardButton.Click += ScrollTabForwardButton_Click;
+ }
+ }
+
+ private void ScrollTabBackButton_Click(object sender, RoutedEventArgs e)
+ {
+ _tabScroller.ChangeView(Math.Max(0, _tabScroller.HorizontalOffset - ScrollAmount), null, null);
+ }
+
+ private void ScrollTabForwardButton_Click(object sender, RoutedEventArgs e)
+ {
+ _tabScroller.ChangeView(Math.Min(_tabScroller.ScrollableWidth, _tabScroller.HorizontalOffset + ScrollAmount), null, null);
+ }
+
+ private void TabView_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ if (_isDragging)
+ {
+ // Skip if we're dragging, we'll reset when we're done.
+ return;
+ }
+
+ if (_tabContentPresenter != null)
+ {
+ if (SelectedItem == null)
+ {
+ _tabContentPresenter.Content = null;
+ _tabContentPresenter.ContentTemplate = null;
+ }
+ else
+ {
+ if (ContainerFromItem(SelectedItem) is TabViewItem container)
+ {
+ _tabContentPresenter.Content = container.Content;
+ _tabContentPresenter.ContentTemplate = container.ContentTemplate;
+ }
+ }
+ }
+
+ // If our width can be effected by the selection, need to run algorithm.
+ if (!double.IsNaN(SelectedTabWidth))
+ {
+ TabView_SizeChanged(sender, null);
+ }
+ }
+
+ ///
+ protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
+ {
+ base.PrepareContainerForItemOverride(element, item);
+
+ var tabitem = element as TabViewItem;
+
+ tabitem.Loaded += TabViewItem_Loaded;
+ tabitem.Closing += TabViewItem_Closing;
+
+ if (tabitem.Header == null)
+ {
+ tabitem.Header = item;
+ }
+
+ if (tabitem.HeaderTemplate == null)
+ {
+ var headertemplatebinding = new Binding()
+ {
+ Source = this,
+ Path = new PropertyPath(nameof(ItemHeaderTemplate)),
+ Mode = BindingMode.OneWay
+ };
+ tabitem.SetBinding(TabViewItem.HeaderTemplateProperty, headertemplatebinding);
+ }
+
+ if (tabitem.IsClosable != true && tabitem.ReadLocalValue(TabViewItem.IsClosableProperty) == DependencyProperty.UnsetValue)
+ {
+ var iscloseablebinding = new Binding()
+ {
+ Source = this,
+ Path = new PropertyPath(nameof(CanCloseTabs)),
+ Mode = BindingMode.OneWay,
+ };
+ tabitem.SetBinding(TabViewItem.IsClosableProperty, iscloseablebinding);
+ }
+ }
+
+ private void TabViewItem_Loaded(object sender, RoutedEventArgs e)
+ {
+ var tabitem = sender as TabViewItem;
+
+ tabitem.Loaded -= TabViewItem_Loaded;
+
+ // Only need to do this once.
+ if (!_hasLoaded)
+ {
+ _hasLoaded = true;
+
+ // Need to set a tab's selection on load, otherwise ListView resets to null.
+ SetInitialSelection();
+
+ // Need to make sure ContentPresenter is set to content based on selection.
+ TabView_SelectionChanged(this, null);
+
+ // Need to make sure we've registered our removal method.
+ ItemsSource_PropertyChanged(this, null);
+
+ // Make sure we complete layout now.
+ TabView_SizeChanged(this, null);
+ }
+ }
+
+ private void TabViewItem_Closing(object sender, TabClosingEventArgs e)
+ {
+ var item = ItemFromContainer(e.Tab);
+
+ var args = new TabClosingEventArgs(item, e.Tab);
+ TabClosing?.Invoke(this, args);
+
+ if (!args.Cancel)
+ {
+ if (ItemsSource != null)
+ {
+ _removeItemsSourceMethod?.Invoke(ItemsSource, new object[] { item });
+ }
+ else
+ {
+ Items.Remove(item);
+ }
+ }
+ }
+
+ private void TabView_DragItemsStarting(object sender, DragItemsStartingEventArgs e)
+ {
+ // Keep track of drag so we don't modify content until done.
+ _isDragging = true;
+ }
+
+ private void TabView_DragItemsCompleted(ListViewBase sender, DragItemsCompletedEventArgs args)
+ {
+ _isDragging = false;
+
+ // args.DropResult == None when outside of area (e.g. create new window)
+ if (args.DropResult == DataPackageOperation.None)
+ {
+ var item = args.Items.FirstOrDefault();
+ var tab = ContainerFromItem(item) as TabViewItem;
+
+ if (tab == null && item is FrameworkElement fe)
+ {
+ tab = fe.FindParent();
+ }
+
+ if (tab == null)
+ {
+ // We still don't have a TabViewItem, most likely is a static TabViewItem in the template being dragged and not selected.
+ // This is a fallback scenario for static tabs.
+ // Note: This can be wrong if two TabViewItems share the exact same Content (i.e. a string), this should be unlikely in any practical scenario.
+ for (int i = 0; i < Items.Count; i++)
+ {
+ var tabItem = ContainerFromIndex(i) as TabViewItem;
+ if (ReferenceEquals(tabItem.Content, item))
+ {
+ tab = tabItem;
+ break;
+ }
+ }
+ }
+
+ TabDraggedOutside?.Invoke(this, new TabDraggedOutsideEventArgs(item, tab));
+ }
+ else
+ {
+ // If dragging the active tab, there's an issue with the CP blanking.
+ TabView_SelectionChanged(this, null);
+ }
+ }
+ }
+}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabView.xaml b/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabView.xaml
new file mode 100644
index 00000000000..7a4d0ef0c27
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabView.xaml
@@ -0,0 +1,734 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+ 0,0,8,0
+ 8,0,-8,0
+ 0,1,1,0
+ 16
+ 48
+ 40
+ NaN
+ 32
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabViewItem.Properties.cs b/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabViewItem.Properties.cs
new file mode 100644
index 00000000000..3ce0f3e5483
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabViewItem.Properties.cs
@@ -0,0 +1,79 @@
+// 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;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls
+{
+ ///
+ /// Item Container for a .
+ ///
+ public partial class TabViewItem
+ {
+ ///
+ /// Gets or sets the header content for the tab.
+ ///
+ public object Header
+ {
+ get { return (object)GetValue(HeaderProperty); }
+ set { SetValue(HeaderProperty, value); }
+ }
+
+ ///
+ /// Identifies the dependency property.
+ ///
+ /// The identifier for the dependency property.
+ public static readonly DependencyProperty HeaderProperty =
+ DependencyProperty.Register(nameof(Header), typeof(object), typeof(TabViewItem), new PropertyMetadata(null));
+
+ ///
+ /// Gets or sets the icon to appear in the tab header.
+ ///
+ public IconElement Icon
+ {
+ get { return (IconElement)GetValue(IconProperty); }
+ set { SetValue(IconProperty, value); }
+ }
+
+ ///
+ /// Identifies the dependency property.
+ ///
+ /// The identifier for the dependency property.
+ public static readonly DependencyProperty IconProperty =
+ DependencyProperty.Register(nameof(Icon), typeof(IconElement), typeof(TabViewItem), new PropertyMetadata(null));
+
+ ///
+ /// Gets or sets the template to override for the tab header.
+ ///
+ public DataTemplate HeaderTemplate
+ {
+ get { return (DataTemplate)GetValue(HeaderTemplateProperty); }
+ set { SetValue(HeaderTemplateProperty, value); }
+ }
+
+ ///
+ /// Identifies the dependency property.
+ ///
+ /// The identifier for the dependency property.
+ public static readonly DependencyProperty HeaderTemplateProperty =
+ DependencyProperty.Register(nameof(HeaderTemplate), typeof(DataTemplate), typeof(TabViewItem), new PropertyMetadata(null));
+
+ ///
+ /// Gets or sets a value indicating whether the tab can be closed by the user with the close button.
+ ///
+ public bool IsClosable
+ {
+ get { return (bool)GetValue(IsClosableProperty); }
+ set { SetValue(IsClosableProperty, value); }
+ }
+
+ ///
+ /// Identifies the dependency property.
+ ///
+ /// The identifier for the dependency property.
+ public static readonly DependencyProperty IsClosableProperty =
+ DependencyProperty.Register(nameof(IsClosable), typeof(bool), typeof(TabViewItem), new PropertyMetadata(null));
+ }
+}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabViewItem.cs b/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabViewItem.cs
new file mode 100644
index 00000000000..1b3832a2d4d
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabViewItem.cs
@@ -0,0 +1,99 @@
+// 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.Devices.Input;
+using Windows.UI.Input;
+using Windows.UI.Xaml;
+using Windows.UI.Xaml.Controls;
+using Windows.UI.Xaml.Controls.Primitives;
+using Windows.UI.Xaml.Input;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls
+{
+ ///
+ /// Item Container for a .
+ ///
+ [TemplatePart(Name = TabCloseButtonName, Type = typeof(ButtonBase))]
+ public partial class TabViewItem : ListViewItem
+ {
+ private const string TabCloseButtonName = "CloseButton";
+
+ private ButtonBase _tabCloseButton;
+
+ private bool _isMiddleClick;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public TabViewItem()
+ {
+ DefaultStyleKey = typeof(TabViewItem);
+ }
+
+ ///
+ /// Fired when the Tab's close button is clicked.
+ ///
+ public event EventHandler Closing;
+
+ ///
+ protected override void OnApplyTemplate()
+ {
+ base.OnApplyTemplate();
+
+ if (_tabCloseButton != null)
+ {
+ _tabCloseButton.Click -= TabCloseButton_Click;
+ }
+
+ _tabCloseButton = GetTemplateChild(TabCloseButtonName) as ButtonBase;
+
+ if (_tabCloseButton != null)
+ {
+ _tabCloseButton.Click += TabCloseButton_Click;
+ }
+ }
+
+ ///
+ protected override void OnPointerPressed(PointerRoutedEventArgs e)
+ {
+ base.OnPointerPressed(e);
+
+ _isMiddleClick = false;
+
+ if (e.Pointer.PointerDeviceType == PointerDeviceType.Mouse)
+ {
+ PointerPoint pointerPoint = e.GetCurrentPoint(this);
+
+ // Record if middle button is pressed
+ if (pointerPoint.Properties.IsMiddleButtonPressed)
+ {
+ _isMiddleClick = true;
+ }
+ }
+ }
+
+ ///
+ protected override void OnPointerReleased(PointerRoutedEventArgs e)
+ {
+ base.OnPointerReleased(e);
+
+ // Close on Middle-Click
+ if (_isMiddleClick)
+ {
+ TabCloseButton_Click(this, null);
+ }
+
+ _isMiddleClick = false;
+ }
+
+ private void TabCloseButton_Click(object sender, RoutedEventArgs e)
+ {
+ if (IsClosable)
+ {
+ Closing?.Invoke(this, new TabClosingEventArgs(Content, this));
+ }
+ }
+ }
+}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabWidthMode.cs b/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabWidthMode.cs
new file mode 100644
index 00000000000..65b1ce03844
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/TabView/TabWidthMode.cs
@@ -0,0 +1,36 @@
+// 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;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls
+{
+ ///
+ /// Possible modes for how to layout a Header's Width in the .
+ ///
+ public enum TabWidthMode
+ {
+ ///
+ /// Each tab header takes up as much space as it needs. This is similar to how WPF and Visual Studio Code behave.
+ /// Suggest to keep set to false.
+ /// is ignored.
+ /// In this scenario, tab width behavior is effectively turned off. This can be useful when using custom styling or a custom panel for layout of as well.
+ ///
+ Actual,
+
+ ///
+ /// Each tab header will use the minimal space set by on the .
+ /// Suggest to set the to show more content for the selected item.
+ ///
+ Compact,
+
+ ///
+ /// Each tab header will fill to fit the available space. If is set, that will be used as a Maximum Width.
+ /// This is similar to how Microsoft Edge behaves when used with the .
+ /// Suggest to set to true.
+ /// Suggest to set to 200 and the TabViewItemHeaderMinWidth Resource to 90.
+ ///
+ Equal,
+ }
+}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/Themes/Generic.xaml b/Microsoft.Toolkit.Uwp.UI.Controls/Themes/Generic.xaml
index 0a86342e01d..b40433ce5b2 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/Themes/Generic.xaml
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/Themes/Generic.xaml
@@ -26,5 +26,6 @@
+
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/VisualStudioToolsManifest.xml b/Microsoft.Toolkit.Uwp.UI.Controls/VisualStudioToolsManifest.xml
index caefeb140a4..e2bc71350ef 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/VisualStudioToolsManifest.xml
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/VisualStudioToolsManifest.xml
@@ -33,6 +33,8 @@
+
+
diff --git a/Microsoft.Toolkit.Uwp.UI/Converters/DoubleToObjectConverter.cs b/Microsoft.Toolkit.Uwp.UI/Converters/DoubleToObjectConverter.cs
new file mode 100644
index 00000000000..cadeeae4043
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI/Converters/DoubleToObjectConverter.cs
@@ -0,0 +1,160 @@
+// 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;
+using Windows.UI.Xaml.Data;
+
+namespace Microsoft.Toolkit.Uwp.UI.Converters
+{
+ ///
+ /// This class converts a double value into an other object.
+ /// Can be used to convert doubles to visibility, a couple of colors, couple of images, etc.
+ /// If GreaterThan and LessThan are both set, the logic looks for a value inbetween the two values.
+ /// Otherwise the logic looks for the value to be GreaterThan or LessThan the specified value.
+ /// The ConverterParameter can be used to invert the logic.
+ ///
+ [Bindable]
+ public class DoubleToObjectConverter : DependencyObject, IValueConverter
+ {
+ ///
+ /// Identifies the property.
+ ///
+ public static readonly DependencyProperty TrueValueProperty =
+ DependencyProperty.Register(nameof(TrueValue), typeof(object), typeof(DoubleToObjectConverter), new PropertyMetadata(null));
+
+ ///
+ /// Identifies the property.
+ ///
+ public static readonly DependencyProperty FalseValueProperty =
+ DependencyProperty.Register(nameof(FalseValue), typeof(object), typeof(DoubleToObjectConverter), new PropertyMetadata(null));
+
+ ///
+ /// Identifies the property.
+ ///
+ public static readonly DependencyProperty NullValueProperty =
+ DependencyProperty.Register(nameof(NullValue), typeof(object), typeof(DoubleToObjectConverter), new PropertyMetadata(null));
+
+ ///
+ /// Identifies the property.
+ ///
+ public static readonly DependencyProperty GreaterThanProperty =
+ DependencyProperty.Register(nameof(GreaterThan), typeof(double), typeof(DoubleToObjectConverter), new PropertyMetadata(double.NaN));
+
+ ///
+ /// Identifies the property.
+ ///
+ public static readonly DependencyProperty LessThanProperty =
+ DependencyProperty.Register(nameof(LessThan), typeof(double), typeof(DoubleToObjectConverter), new PropertyMetadata(double.NaN));
+
+ ///
+ /// Gets or sets the value to be returned when the expression is true
+ ///
+ public object TrueValue
+ {
+ get { return GetValue(TrueValueProperty); }
+ set { SetValue(TrueValueProperty, value); }
+ }
+
+ ///
+ /// Gets or sets the value to be returned when the expression is false
+ ///
+ public object FalseValue
+ {
+ get { return GetValue(FalseValueProperty); }
+ set { SetValue(FalseValueProperty, value); }
+ }
+
+ ///
+ /// Gets or sets the value to be returned when the value passed is null
+ ///
+ public object NullValue
+ {
+ get { return GetValue(NullValueProperty); }
+ set { SetValue(NullValueProperty, value); }
+ }
+
+ ///
+ /// Gets or sets the value to check if the value is GreaterThan this value.
+ ///
+ public double GreaterThan
+ {
+ get { return (double)GetValue(GreaterThanProperty); }
+ set { SetValue(GreaterThanProperty, value); }
+ }
+
+ ///
+ /// Gets or sets the value to check if the value is LessThan this value.
+ ///
+ public double LessThan
+ {
+ get { return (double)GetValue(LessThanProperty); }
+ set { SetValue(LessThanProperty, value); }
+ }
+
+ ///
+ /// Convert a boolean value to an other object.
+ ///
+ /// The source data being passed to the target.
+ /// The type of the target property, as a type reference.
+ /// An optional parameter to be used to invert the converter logic.
+ /// The language of the conversion.
+ /// The value to be passed to the target dependency property.
+ public object Convert(object value, Type targetType, object parameter, string language)
+ {
+ if (value == null)
+ {
+ return NullValue;
+ }
+
+ double vd = 0.0; // DEFAULT?
+ if (value is double dbl)
+ {
+ vd = dbl;
+ }
+ else if (double.TryParse(value.ToString(), out double result))
+ {
+ vd = result;
+ }
+
+ var boolValue = false;
+
+ if (GreaterThan != double.NaN && LessThan != double.NaN &&
+ vd > GreaterThan && vd < LessThan)
+ {
+ boolValue = true;
+ }
+ else if (GreaterThan != double.NaN && vd > GreaterThan)
+ {
+ boolValue = true;
+ }
+ else if (LessThan != double.NaN && vd < LessThan)
+ {
+ boolValue = true;
+ }
+
+ // Negate if needed
+ if (ConverterTools.TryParseBool(parameter))
+ {
+ boolValue = !boolValue;
+ }
+
+ return ConverterTools.Convert(boolValue ? TrueValue : FalseValue, targetType);
+ }
+
+ ///
+ /// Convert back the value to a boolean
+ ///
+ /// If the parameter is a reference type, must match its reference to return true.
+ /// The target data being passed to the source.
+ /// The type of the target property, as a type reference (System.Type for Microsoft .NET, a TypeName helper struct for Visual C++ component extensions (C++/CX)).
+ /// An optional parameter to be used to invert the converter logic.
+ /// The language of the conversion.
+ /// The value to be passed to the source object.
+ public object ConvertBack(object value, Type targetType, object parameter, string language)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/Microsoft.Toolkit.Uwp.UI/Converters/DoubleToVisibilityConverter.cs b/Microsoft.Toolkit.Uwp.UI/Converters/DoubleToVisibilityConverter.cs
new file mode 100644
index 00000000000..9a88789b784
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI/Converters/DoubleToVisibilityConverter.cs
@@ -0,0 +1,26 @@
+// 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.Data;
+
+namespace Microsoft.Toolkit.Uwp.UI.Converters
+{
+ ///
+ /// This class converts a double value into a Visibility enumeration.
+ ///
+ [Bindable]
+ public class DoubleToVisibilityConverter : DoubleToObjectConverter
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public DoubleToVisibilityConverter()
+ {
+ TrueValue = Visibility.Visible;
+ FalseValue = Visibility.Collapsed;
+ NullValue = Visibility.Collapsed;
+ }
+ }
+}
diff --git a/Microsoft.Toolkit.Uwp.UI/Extensions/FrameworkElement/FrameworkElementExtensions.cs b/Microsoft.Toolkit.Uwp.UI/Extensions/FrameworkElement/FrameworkElementExtensions.ActualSize.cs
similarity index 96%
rename from Microsoft.Toolkit.Uwp.UI/Extensions/FrameworkElement/FrameworkElementExtensions.cs
rename to Microsoft.Toolkit.Uwp.UI/Extensions/FrameworkElement/FrameworkElementExtensions.ActualSize.cs
index 46794fb119a..e16dfcab52c 100644
--- a/Microsoft.Toolkit.Uwp.UI/Extensions/FrameworkElement/FrameworkElementExtensions.cs
+++ b/Microsoft.Toolkit.Uwp.UI/Extensions/FrameworkElement/FrameworkElementExtensions.ActualSize.cs
@@ -18,7 +18,7 @@ public static partial class FrameworkElementExtensions
///
/// Attached for enabling actual size binding on any .
///
- public static readonly DependencyProperty EnableActualSizeBindingProperty = DependencyProperty.RegisterAttached("EnableActualSizeBinding", typeof(bool), typeof(FrameworkElementExtensions), new PropertyMetadata(false, OnEnableActualSizeBindingtPropertyChanged));
+ public static readonly DependencyProperty EnableActualSizeBindingProperty = DependencyProperty.RegisterAttached("EnableActualSizeBinding", typeof(bool), typeof(FrameworkElementExtensions), new PropertyMetadata(false, OnEnableActualSizeBindingPropertyChanged));
///
/// Attached for binding a for the
@@ -90,7 +90,7 @@ public static void SetActualWidth(FrameworkElement obj, double value)
obj.SetValue(ActualWidthProperty, value);
}
- private static void OnEnableActualSizeBindingtPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
+ private static void OnEnableActualSizeBindingPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
{
var baseElement = sender as FrameworkElement;
if (baseElement == null)
diff --git a/Microsoft.Toolkit.Uwp.UI/Extensions/FrameworkElement/FrameworkElementExtensions.RelativeAncestor.cs b/Microsoft.Toolkit.Uwp.UI/Extensions/FrameworkElement/FrameworkElementExtensions.RelativeAncestor.cs
new file mode 100644
index 00000000000..1b04197e110
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI/Extensions/FrameworkElement/FrameworkElementExtensions.RelativeAncestor.cs
@@ -0,0 +1,89 @@
+// 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.UI.Extensions
+{
+ ///
+ /// Provides attached dependency properties for the
+ ///
+ public static partial class FrameworkElementExtensions
+ {
+ ///
+ /// Retrieves the parent object of this framework element found of the given .
+ ///
+ /// FrameworkElement
+ /// Parent object
+ public static object GetAncestor(DependencyObject obj)
+ {
+ return (object)obj.GetValue(AncestorProperty);
+ }
+
+ ///
+ /// Sets the parent object of the framework element (internal).
+ ///
+ /// Parent object
+ /// FrameworkElement
+ public static void SetAncestor(DependencyObject obj, object value)
+ {
+ obj.SetValue(AncestorProperty, value);
+ }
+
+ ///
+ /// Attached for retrieving a parent for the
+ ///
+ public static readonly DependencyProperty AncestorProperty =
+ DependencyProperty.RegisterAttached("Ancestor", typeof(object), typeof(FrameworkElementExtensions), new PropertyMetadata(null));
+
+ ///
+ /// Gets the Type of Ancestor to look for from this element.
+ ///
+ /// Blah blah
+ public static Type GetAncestorType(DependencyObject obj)
+ {
+ return (Type)obj.GetValue(AncestorTypeProperty);
+ }
+
+ ///
+ /// Sets the to look for from this element and place in the .
+ ///
+ public static void SetAncestorType(DependencyObject obj, Type value)
+ {
+ obj.SetValue(AncestorTypeProperty, value);
+ }
+
+ ///
+ /// Attached for retrieving a parent for the based on the provided in the .
+ ///
+ public static readonly DependencyProperty AncestorTypeProperty =
+ DependencyProperty.RegisterAttached("AncestorType", typeof(Type), typeof(FrameworkElementExtensions), new PropertyMetadata(null, AncestorType_PropertyChanged));
+
+ private static void AncestorType_PropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
+ {
+ if (obj is FrameworkElement fe)
+ {
+ fe.Loaded -= FrameworkElement_Loaded;
+
+ if (args.NewValue != null)
+ {
+ fe.Loaded += FrameworkElement_Loaded;
+ if (fe.Parent != null)
+ {
+ FrameworkElement_Loaded(fe, null);
+ }
+ }
+ }
+ }
+
+ private static void FrameworkElement_Loaded(object sender, RoutedEventArgs e)
+ {
+ if (sender is FrameworkElement fe)
+ {
+ SetAncestor(fe, fe.FindAscendant(GetAncestorType(fe)));
+ }
+ }
+ }
+}
diff --git a/Microsoft.Toolkit.Uwp.UI/Extensions/Markup/OnDevice.cs b/Microsoft.Toolkit.Uwp.UI/Extensions/Markup/OnDevice.cs
new file mode 100644
index 00000000000..21fdf480344
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI/Extensions/Markup/OnDevice.cs
@@ -0,0 +1,89 @@
+// 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.ApplicationModel;
+using Windows.UI.Xaml.Data;
+using Windows.UI.Xaml.Markup;
+
+namespace Microsoft.Toolkit.Uwp.UI.Extensions.Markup
+{
+ ///
+ /// The OnDevice markup extension allows you to customize UI appearance on a per-DeviceFamily basis.
+ ///
+ ///
+ /// The next TextBlock will show the text 'Hello' on desktop computers, 'World' on Xbox and 'Hi' on all other devices
+ ///
+ ///
+ ///
+ ///
+ [Bindable]
+ public class OnDevice : MarkupExtension
+ {
+ ///
+ /// Gets or sets the default value for this property
+ ///
+ public object Default { get; set; }
+
+ ///
+ /// Gets or sets a value for this property on Desktop
+ ///
+ public object Desktop { get; set; }
+
+ ///
+ /// Gets or sets a value for this property on Holographic
+ ///
+ public object Holographic { get; set; }
+
+ ///
+ /// Gets or sets a value for this property on IoT
+ ///
+ public object IoT { get; set; }
+
+ ///
+ /// Gets or sets a value for this property on Team
+ ///
+ public object Team { get; set; }
+
+ ///
+ /// Gets or sets a value for this property on Xbox
+ ///
+ public object Xbox { get; set; }
+
+ ///
+ /// Returns an object value for the current DeviceFamily, Default is used when it is not set.
+ ///
+ /// The object value to set on the property where the extension is applied.
+ protected override object ProvideValue()
+ {
+ string deviceFamily = null;
+ if (DesignMode.DesignMode2Enabled)
+ {
+ // TODO: detect DeviceFamily in XAML Designer (device dropdown)
+ // deviceFamily = ???
+ }
+ else
+ {
+ deviceFamily = Uwp.Helpers.SystemInformation.DeviceFamily;
+ }
+
+ switch (deviceFamily)
+ {
+ case "Windows.Desktop":
+ return this.Desktop ?? this.Default;
+ case "Windows.Holographic":
+ return this.Holographic ?? this.Default;
+ case "Windows.IoT":
+ return this.IoT ?? this.Default;
+ case "Windows.Team":
+ return this.Team ?? this.Default;
+ case "Windows.Xbox":
+ return this.Xbox ?? this.Default;
+ default:
+ return this.Default;
+ }
+ }
+ }
+}
diff --git a/Microsoft.Toolkit.Uwp.UI/Extensions/Tree/VisualTree.cs b/Microsoft.Toolkit.Uwp.UI/Extensions/Tree/VisualTree.cs
index ef1d33fb5b7..73177af5c27 100644
--- a/Microsoft.Toolkit.Uwp.UI/Extensions/Tree/VisualTree.cs
+++ b/Microsoft.Toolkit.Uwp.UI/Extensions/Tree/VisualTree.cs
@@ -78,6 +78,37 @@ public static T FindDescendant(this DependencyObject element)
return retValue;
}
+ ///
+ /// Find first descendant control of a specified type.
+ ///
+ /// Parent element.
+ /// Type of descendant.
+ /// Descendant control or null if not found.
+ public static object FindDescendant(this DependencyObject element, Type type)
+ {
+ object retValue = null;
+ var childrenCount = VisualTreeHelper.GetChildrenCount(element);
+
+ for (var i = 0; i < childrenCount; i++)
+ {
+ var child = VisualTreeHelper.GetChild(element, i);
+ if (child.GetType() == type)
+ {
+ retValue = child;
+ break;
+ }
+
+ retValue = FindDescendant(child, type);
+
+ if (retValue != null)
+ {
+ break;
+ }
+ }
+
+ return retValue;
+ }
+
///
/// Find all descendant controls of the specified type.
///
@@ -157,6 +188,29 @@ public static T FindAscendant(this DependencyObject element)
return parent.FindAscendant();
}
+ ///
+ /// Find first visual ascendant control of a specified type.
+ ///
+ /// Child element.
+ /// Type of ascendant to look for.
+ /// Ascendant control or null if not found.
+ public static object FindAscendant(this DependencyObject element, Type type)
+ {
+ var parent = VisualTreeHelper.GetParent(element);
+
+ if (parent == null)
+ {
+ return null;
+ }
+
+ if (parent.GetType() == type)
+ {
+ return parent;
+ }
+
+ return parent.FindAscendant(type);
+ }
+
///
/// Find all visual ascendants for the element.
///
diff --git a/Microsoft.Toolkit.Uwp.UI/Helpers/ThemeListener.cs b/Microsoft.Toolkit.Uwp.UI/Helpers/ThemeListener.cs
index c8209ff93f2..42e75842550 100644
--- a/Microsoft.Toolkit.Uwp.UI/Helpers/ThemeListener.cs
+++ b/Microsoft.Toolkit.Uwp.UI/Helpers/ThemeListener.cs
@@ -78,7 +78,7 @@ private void Accessible_HighContrastChanged(AccessibilitySettings sender, object
private async void Settings_ColorValuesChanged(UISettings sender, object args)
{
// Getting called off thread, so we need to dispatch to request value.
- await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
+ await CoreApplication.MainView?.CoreWindow?.Dispatcher?.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
{
// TODO: This doesn't stop the multiple calls if we're in our faked 'White' HighContrast Mode below.
if (CurrentTheme != Application.Current.RequestedTheme ||
diff --git a/Microsoft.Toolkit.Uwp.UI/Media/CanvasBrushBase.cs b/Microsoft.Toolkit.Uwp.UI/Media/CanvasBrushBase.cs
index 0f21bd83396..44c2b488da6 100644
--- a/Microsoft.Toolkit.Uwp.UI/Media/CanvasBrushBase.cs
+++ b/Microsoft.Toolkit.Uwp.UI/Media/CanvasBrushBase.cs
@@ -29,6 +29,10 @@ public abstract class CanvasBrushBase : XamlCompositionBrushBase
///
protected float SurfaceHeight { get; set; }
+ private CanvasDevice _device;
+
+ private CompositionGraphicsDevice _graphics;
+
///
/// Implemented by parent class and called when canvas is being constructed for brush.
///
@@ -45,6 +49,22 @@ protected override void OnConnected()
{
base.OnConnected();
+ if (_device != null)
+ {
+ _device.DeviceLost -= CanvasDevice_DeviceLost;
+ }
+
+ _device = CanvasDevice.GetSharedDevice();
+ _device.DeviceLost += CanvasDevice_DeviceLost;
+
+ if (_graphics != null)
+ {
+ _graphics.RenderingDeviceReplaced -= CanvasDevice_RenderingDeviceReplaced;
+ }
+
+ _graphics = CanvasComposition.CreateCompositionGraphicsDevice(Window.Current.Compositor, _device);
+ _graphics.RenderingDeviceReplaced += CanvasDevice_RenderingDeviceReplaced;
+
// Delay creating composition resources until they're required.
if (CompositionBrush == null)
{
@@ -55,16 +75,12 @@ protected override void OnConnected()
}
var size = new Vector2(SurfaceWidth, SurfaceHeight);
-
- var device = CanvasDevice.GetSharedDevice();
- var graphics = CanvasComposition.CreateCompositionGraphicsDevice(Window.Current.Compositor, device);
-
- var surface = graphics.CreateDrawingSurface(size.ToSize(), DirectXPixelFormat.B8G8R8A8UIntNormalized, DirectXAlphaMode.Premultiplied);
+ var surface = _graphics.CreateDrawingSurface(size.ToSize(), DirectXPixelFormat.B8G8R8A8UIntNormalized, DirectXAlphaMode.Premultiplied);
using (var session = CanvasComposition.CreateDrawingSession(surface))
{
// Call Implementor to draw on session.
- if (!OnDraw(device, session, size))
+ if (!OnDraw(_device, session, size))
{
return;
}
@@ -77,6 +93,18 @@ protected override void OnConnected()
}
}
+ private void CanvasDevice_RenderingDeviceReplaced(CompositionGraphicsDevice sender, object args)
+ {
+ OnDisconnected();
+ OnConnected();
+ }
+
+ private void CanvasDevice_DeviceLost(CanvasDevice sender, object args)
+ {
+ OnDisconnected();
+ OnConnected();
+ }
+
///
/// Deconstructs the Composition Brush.
///
@@ -84,6 +112,18 @@ protected override void OnDisconnected()
{
base.OnDisconnected();
+ if (_device != null)
+ {
+ _device.DeviceLost -= CanvasDevice_DeviceLost;
+ _device = null;
+ }
+
+ if (_graphics != null)
+ {
+ _graphics.RenderingDeviceReplaced -= CanvasDevice_RenderingDeviceReplaced;
+ _graphics = null;
+ }
+
// Dispose of composition resources when no longer in use.
if (CompositionBrush != null)
{
diff --git a/Microsoft.Toolkit.Uwp/Helpers/BackgroundTaskHelper.cs b/Microsoft.Toolkit.Uwp/Helpers/BackgroundTaskHelper.cs
index d3b8eb02e73..7f400811d85 100644
--- a/Microsoft.Toolkit.Uwp/Helpers/BackgroundTaskHelper.cs
+++ b/Microsoft.Toolkit.Uwp/Helpers/BackgroundTaskHelper.cs
@@ -9,32 +9,32 @@
namespace Microsoft.Toolkit.Uwp.Helpers
{
///
- /// This class provides static helper methods for background task.
+ /// This class provides static helper methods for background tasks.
///
public static class BackgroundTaskHelper
{
///
- /// Check if a background task is registered.
+ /// Determines whether a background task is registered.
///
/// The name of the background task class
- /// True/False indicating if a background task was registered or not
+ /// true if a background task was registered; otherwise, false.
public static bool IsBackgroundTaskRegistered(string backgroundTaskName)
{
return BackgroundTaskRegistration.AllTasks.Any(t => t.Value.Name == backgroundTaskName);
}
///
- /// Check if a background task is registered.
+ /// Determines whether a background task is registered.
///
/// The type of the background task. This class has to implement IBackgroundTask
- /// True/False indicating if a background task was registered or not
+ /// true if a background task was registered; otherwise, false.
public static bool IsBackgroundTaskRegistered(Type backgroundTaskType)
{
return IsBackgroundTaskRegistered(backgroundTaskType.Name);
}
///
- /// Register a background task with conditions.
+ /// Registers a background task with conditions.
/// If the task is already registered, return null.
/// Or set to true to un-register the old one and then re-register.
///
@@ -86,7 +86,7 @@ public static BackgroundTaskRegistration Register(string backgroundTaskName, str
}
///
- /// Register a background task with conditions.
+ /// Registers a background task with conditions.
/// If the task is already registered and has the same trigger, returns the existing registration if it has the same trigger.
/// If the task is already registered but has different trigger, return null by default.
/// Or set to true to un-register the old one and then re-register.
@@ -103,8 +103,8 @@ public static BackgroundTaskRegistration Register(Type backgroundTaskType, IBack
}
///
- /// This registers under the Single Process Model. WARNING: Single Process Model only works with Windows 10 Anniversary Update (14393) and later.
- /// Register a background task with conditions.
+ /// Registers under the Single Process Model. WARNING: Single Process Model only works with Windows 10 Anniversary Update (14393) and later.
+ /// Registers a background task with conditions.
/// If the task is already registered and has the same trigger, returns the existing registration if it has the same trigger.
/// If the task is already registered but has different trigger, return null by default.
/// Or set to true to un-register the old one and then re-register.
@@ -121,17 +121,17 @@ public static BackgroundTaskRegistration Register(string backgroundTaskName, IBa
}
///
- /// Unregister a background task
+ /// Unregisters a background task.
///
/// The type of the background task
- /// /// Force the background task to quit if it is currently running (at the time of unregistering). Default value is true.
+ /// Force the background task to quit if it is currently running (at the time of unregistering). Default value is true.
public static void Unregister(Type backgroundTaskType, bool forceExit = true)
{
Unregister(backgroundTaskType.Name, forceExit);
}
///
- /// Unregister a background task
+ /// Unregisters a background task.
///
/// The name of the background task class
/// Force the background task to quit if it is currently running (at the time of unregistering). Default value is true.
@@ -141,7 +141,7 @@ public static void Unregister(string backgroundTaskName, bool forceExit = true)
}
///
- /// Unregister a background task
+ /// Unregisters a background task.
///
/// A background task that was previously registered with the system
/// Force the background task to quit if it is currently running (at the time of unregistering). Default value is true.
@@ -151,20 +151,20 @@ public static void Unregister(IBackgroundTaskRegistration backgroundTask, bool f
}
///
- /// Get the registered background task of the given type.
+ /// Returns the registered background task of the given type.
///
/// Type of the background task class. This class has to implement IBackgroundTask
- /// Background task if there is such background task registered. Otherwise, null
+ /// The registered background task if it exists; otherwise, null.
public static IBackgroundTaskRegistration GetBackgroundTask(Type backgroundTaskType)
{
return GetBackgroundTask(backgroundTaskType.Name);
}
///
- /// Get the registered background task of the given type.
+ /// Returns the registered background task of the given type.
///
/// Name of the background task class
- /// background task if there is such background task registered. Otherwise, null
+ /// The registered background task if it exists; otherwise, null.
public static IBackgroundTaskRegistration GetBackgroundTask(string backgroundTaskName)
{
return BackgroundTaskRegistration.AllTasks.FirstOrDefault(t => t.Value.Name == backgroundTaskName).Value;
diff --git a/Microsoft.Toolkit.Uwp/Helpers/CameraHelper/CameraHelper.cs b/Microsoft.Toolkit.Uwp/Helpers/CameraHelper/CameraHelper.cs
index 2c16fa6a99f..2df16f0c836 100644
--- a/Microsoft.Toolkit.Uwp/Helpers/CameraHelper/CameraHelper.cs
+++ b/Microsoft.Toolkit.Uwp/Helpers/CameraHelper/CameraHelper.cs
@@ -15,7 +15,7 @@
namespace Microsoft.Toolkit.Uwp.Helpers
{
///
- /// Camera Helper class to capture frames from available camera sources.
+ /// Helper class for capturing frames from available camera sources.
/// Make sure you have the capability webcam enabled for your app to access the device's camera.
///
public class CameraHelper : IDisposable
@@ -31,7 +31,7 @@ public class CameraHelper : IDisposable
private bool _initialized;
///
- /// Gets a list of MediaFrameSourceGroups available for video preview or video record.
+ /// Gets a list of available for video preview or video record.
///
/// A list.
public static async Task> GetFrameSourceGroupsAsync()
@@ -51,7 +51,7 @@ public static async Task> GetFrameSourceGro
}
///
- /// Gets the available MediaFrameFormats on the source.
+ /// Gets a list of available on the source.
///
public List FrameFormatsAvailable { get => _frameFormatsAvailable; }
@@ -74,7 +74,7 @@ public MediaFrameSourceGroup FrameSourceGroup
public MediaFrameSource PreviewFrameSource { get => _previewFrameSource; }
///
- /// Event raised when a new frame arrives.
+ /// Occurs when a new frame arrives.
///
public event EventHandler FrameArrived;
@@ -118,11 +118,11 @@ public async Task InitializeAndStartCaptureAsync()
}
else
{
- // verify selected group is part of existing FrameSourceGroups
+ // Verify selected group is part of existing FrameSourceGroups
_group = _frameSourceGroups.FirstOrDefault(g => g.Id == _group.Id);
}
- // if there is no camera source available, we can't proceed.
+ // If there is no camera source available, we can't proceed
if (_group == null)
{
return CameraHelperResult.NoFrameSourceGroupAvailable;
@@ -224,7 +224,7 @@ private async Task InitializeMediaCaptureAsync()
return CameraHelperResult.NoFrameSourceAvailable;
}
- // get only formats of a certain framerate and compatible subtype for previewing, order them by resolution
+ // Get only formats of a certain framerate and compatible subtype for previewing, order them by resolution
_frameFormatsAvailable = _previewFrameSource.SupportedFormats.Where(format =>
format.FrameRate.Numerator / format.FrameRate.Denominator >= 15 // fps
&& (string.Compare(format.Subtype, MediaEncodingSubtypes.Nv12, true) == 0
@@ -237,7 +237,7 @@ private async Task InitializeMediaCaptureAsync()
return CameraHelperResult.NoCompatibleFrameFormatAvailable;
}
- // set the format with the higest resolution available by default
+ // Set the format with the higest resolution available by default
var defaultFormat = _frameFormatsAvailable.Last();
await _previewFrameSource.SetFormatAsync(defaultFormat);
}
@@ -270,7 +270,7 @@ private async Task InitializeMediaCaptureAsync()
}
///
- /// Stops reading from the frame reader, disposes of the reader.
+ /// Stops reading from the frame reader and disposes of the reader.
///
/// A representing the asynchronous operation.
private async Task StopReaderAsync()
diff --git a/Microsoft.Toolkit.Uwp/Helpers/CameraHelper/CameraHelperResult.cs b/Microsoft.Toolkit.Uwp/Helpers/CameraHelper/CameraHelperResult.cs
index 81f1a6cc616..902f5f03221 100644
--- a/Microsoft.Toolkit.Uwp/Helpers/CameraHelper/CameraHelperResult.cs
+++ b/Microsoft.Toolkit.Uwp/Helpers/CameraHelper/CameraHelperResult.cs
@@ -5,37 +5,37 @@
namespace Microsoft.Toolkit.Uwp.Helpers
{
///
- /// Enum indicating result of Camera Helper initialization.
+ /// Enum indicating result of initialization.
///
public enum CameraHelperResult
{
///
- /// Initialization is Successful
+ /// Initialization was successful.
///
Success,
///
- /// Initialization failed, Frame Reader Creation failed
+ /// Initialization failed; Frame Reader Creation failed.
///
CreateFrameReaderFailed,
///
- /// Initialization failed, Unable to start Frame Reader
+ /// Initialization failed; Unable to start Frame Reader.
///
StartFrameReaderFailed,
///
- /// Initialization failed, Frame Source Group is null
+ /// Initialization failed; Frame Source Group is null.
///
NoFrameSourceGroupAvailable,
///
- /// Initialization failed, Frame Source is null
+ /// Initialization failed; Frame Source is null.
///
NoFrameSourceAvailable,
///
- /// Access to camera is denied.
+ /// Access to the camera is denied.
///
CameraAccessDenied,
@@ -45,7 +45,7 @@ public enum CameraHelperResult
InitializationFailed_UnknownError,
///
- /// Initialization failed, there is no compatible frame format exposed via the frame source
+ /// Initialization failed; No compatible frame format exposed by the frame source.
///
NoCompatibleFrameFormatAvailable
}
diff --git a/Microsoft.Toolkit.Uwp/Helpers/CameraHelper/FrameEventArgs.cs b/Microsoft.Toolkit.Uwp/Helpers/CameraHelper/FrameEventArgs.cs
index b54d05f2b5b..ce860bffa1e 100644
--- a/Microsoft.Toolkit.Uwp/Helpers/CameraHelper/FrameEventArgs.cs
+++ b/Microsoft.Toolkit.Uwp/Helpers/CameraHelper/FrameEventArgs.cs
@@ -11,7 +11,7 @@
namespace Microsoft.Toolkit.Uwp.Helpers
{
///
- /// EventArgs to be used by FrameArrived Event
+ /// Provides data for the event.
///
public class FrameEventArgs : EventArgs
{
@@ -20,7 +20,7 @@ public class FrameEventArgs : EventArgs
private SemaphoreSlim _semaphore = new SemaphoreSlim(1);
///
- /// Gets Video Frame
+ /// Gets the video frame.
///
public VideoFrame VideoFrame
{
@@ -28,8 +28,8 @@ public VideoFrame VideoFrame
{
_semaphore.Wait();
- // videoFrame could be disposed at any time so we need to create a copy we can use
- // this api is only available on 17134 - so we return the original VideoFrame on older versions
+ // The VideoFrame could be disposed at any time so we need to create a copy we can use.
+ // This API is only available on 17134 so we return the original VideoFrame on older versions.
if (_videoFrameCopy == null &&
ApiInformation.IsMethodPresent("Windows.Media.VideoFrame", "CreateWithSoftwareBitmap", 1) &&
_videoFrame != null &&
diff --git a/Microsoft.Toolkit.Uwp/Helpers/ColorHelper.cs b/Microsoft.Toolkit.Uwp/Helpers/ColorHelper.cs
index d7eb74c0586..3a98aaee165 100644
--- a/Microsoft.Toolkit.Uwp/Helpers/ColorHelper.cs
+++ b/Microsoft.Toolkit.Uwp/Helpers/ColorHelper.cs
@@ -5,6 +5,7 @@
using System;
using System.Reflection;
using Windows.UI;
+using Color = Windows.UI.Color;
namespace Microsoft.Toolkit.Uwp.Helpers
{
@@ -14,10 +15,11 @@ namespace Microsoft.Toolkit.Uwp.Helpers
public static class ColorHelper
{
///
- /// Returns a color based on XAML color string.
+ /// Creates a from a XAML color string.
+ /// Any format used in XAML should work.
///
- /// The color string. Any format used in XAML should work.
- /// Parsed color
+ /// The XAML color string.
+ /// The created .
public static Color ToColor(this string colorString)
{
if (string.IsNullOrEmpty(colorString))
@@ -120,20 +122,20 @@ public static Color ToColor(this string colorString)
}
///
- /// Converts a Color value to a string representation of the value in hexadecimal.
+ /// Converts a to a hexadecimal string representation.
///
- /// The Color to convert.
- /// Returns a string representing the hex value.
+ /// The color to convert.
+ /// The hexadecimal string representation of the color.
public static string ToHex(this Color color)
{
return $"#{color.A:X2}{color.R:X2}{color.G:X2}{color.B:X2}";
}
///
- /// Returns the color value as a premultiplied Int32 - 4 byte ARGB structure.
+ /// Converts a to a premultiplied Int32 - 4 byte ARGB structure.
///
- /// the Color to convert
- /// Returns a int representing the color.
+ /// The color to convert.
+ /// The int representation of the color.
public static int ToInt(this Color color)
{
var a = color.A + 1;
@@ -142,10 +144,10 @@ public static int ToInt(this Color color)
}
///
- /// Converts an RGBA Color the HSL representation.
+ /// Converts a to an .
///
- /// The Color to convert.
- /// HslColor.
+ /// The to convert.
+ /// The converted .
public static HslColor ToHsl(this Color color)
{
const double toDouble = 1.0 / 255;
@@ -187,10 +189,10 @@ public static HslColor ToHsl(this Color color)
}
///
- /// Converts an RGBA Color the HSV representation.
+ /// Converts a to an .
///
- /// Color to convert.
- /// HsvColor
+ /// The to convert.
+ /// The converted .
public static HsvColor ToHsv(this Color color)
{
const double toDouble = 1.0 / 255;
@@ -231,13 +233,13 @@ public static HsvColor ToHsv(this Color color)
}
///
- /// Returns a Color struct based on HSL model.
+ /// Creates a from the specified hue, saturation, lightness, and alpha values.
///
/// 0..360 range hue
/// 0..1 range saturation
/// 0..1 range lightness
/// 0..1 alpha
- /// A Color object
+ /// The created .
public static Color FromHsl(double hue, double saturation, double lightness, double alpha = 1.0)
{
if (hue < 0 || hue > 360)
@@ -297,13 +299,13 @@ public static Color FromHsl(double hue, double saturation, double lightness, dou
}
///
- /// Returns a Color struct based on HSV model.
+ /// Creates a from the specified hue, saturation, value, and alpha values.
///
/// 0..360 range hue
/// 0..1 range saturation
/// 0..1 range value
/// 0..1 alpha
- /// A Color object
+ /// The created .
public static Color FromHsv(double hue, double saturation, double value, double alpha = 1.0)
{
if (hue < 0 || hue > 360)
diff --git a/Microsoft.Toolkit.Uwp/Helpers/DispatcherHelper.cs b/Microsoft.Toolkit.Uwp/Helpers/DispatcherHelper.cs
index a7fd5541123..1fb644509fa 100644
--- a/Microsoft.Toolkit.Uwp/Helpers/DispatcherHelper.cs
+++ b/Microsoft.Toolkit.Uwp/Helpers/DispatcherHelper.cs
@@ -15,9 +15,9 @@ namespace Microsoft.Toolkit.Uwp.Helpers
public static class DispatcherHelper
{
///
- /// Execute the given function asynchronously on UI thread of the main view
+ /// Executes the given function asynchronously on UI thread of the main view.
///
- /// returned data type of the function
+ /// Returned data type of the function
/// Asynchronous function to be executed asynchronously on UI thread
/// Dispatcher execution priority, default is normal
/// Awaitable Task with type
@@ -27,9 +27,9 @@ public static Task ExecuteOnUIThreadAsync(Func> function, CoreDisp
}
///
- /// Execute the given function asynchronously on given view's UI thread. Default view is the main view.
+ /// Executes the given function asynchronously on given view's UI thread. Default view is the main view.
///
- /// returned data type of the function
+ /// Returned data type of the function
/// View for the to be executed on
/// Asynchronous function to be executed asynchronously on UI thread
/// Dispatcher execution priority, default is normal
@@ -38,14 +38,14 @@ public static Task ExecuteOnUIThreadAsync(this CoreApplicationView viewToE
{
if (viewToExecuteOn == null)
{
- throw new ArgumentNullException("viewToExecuteOn can't be null!");
+ throw new ArgumentNullException(nameof(viewToExecuteOn));
}
return viewToExecuteOn.Dispatcher.AwaitableRunAsync(function, priority);
}
///
- /// Execute the given function asynchronously on given view's UI thread. Default view is the main view.
+ /// Executes the given function asynchronously on given view's UI thread. Default view is the main view.
///
/// View for the to be executed on
/// Asynchronous function to be executed asynchronously on UI thread
@@ -55,14 +55,14 @@ public static Task ExecuteOnUIThreadAsync(this CoreApplicationView viewToExecute
{
if (viewToExecuteOn == null)
{
- throw new ArgumentNullException("viewToExecuteOn can't be null!");
+ throw new ArgumentNullException(nameof(viewToExecuteOn));
}
return viewToExecuteOn.Dispatcher.AwaitableRunAsync(function, priority);
}
///
- /// Execute the given function asynchronously on UI thread of the main view
+ /// Executes the given function asynchronously on UI thread of the main view.
///
/// Asynchronous function to be executed asynchronously on UI thread
/// Dispatcher execution priority, default is normal
@@ -73,7 +73,7 @@ public static Task ExecuteOnUIThreadAsync(Func function, CoreDispatcherPri
}
///
- /// Execute the given function asynchronously on given view's UI thread. Default view is the main view.
+ /// Executes the given function asynchronously on given view's UI thread. Default view is the main view.
///
/// View for the to be executed on
/// Asynchronous function to be executed asynchronously on UI thread
@@ -83,14 +83,14 @@ public static Task ExecuteOnUIThreadAsync(this CoreApplicationView viewToExecute
{
if (viewToExecuteOn == null)
{
- throw new ArgumentNullException("viewToExecuteOn can't be null!");
+ throw new ArgumentNullException(nameof(viewToExecuteOn));
}
return viewToExecuteOn.Dispatcher.AwaitableRunAsync(function, priority);
}
///
- /// Execute the given function asynchronously on given view's UI thread. Default view is the main view.
+ /// Executes the given function asynchronously on given view's UI thread. Default view is the main view.
///
/// Asynchronous function to be executed asynchronously on UI thread
/// Dispatcher execution priority, default is normal
@@ -101,9 +101,9 @@ public static Task ExecuteOnUIThreadAsync(Action function, CoreDispatcherPriorit
}
///
- /// Execute the given function asynchronously on given view's UI thread. Default view is the main view.
+ /// Executes the given function asynchronously on given view's UI thread. Default view is the main view.
///
- /// returned data type of the function
+ /// Returned data type of the function
/// View for the to be executed on
/// Synchronous function with return type to be executed on UI thread
/// Dispatcher execution priority, default is normal
@@ -112,16 +112,16 @@ public static Task ExecuteOnUIThreadAsync(this CoreApplicationView viewToE
{
if (viewToExecuteOn == null)
{
- throw new ArgumentNullException("viewToExecuteOn can't be null!");
+ throw new ArgumentNullException(nameof(viewToExecuteOn));
}
return viewToExecuteOn.Dispatcher.AwaitableRunAsync(function, priority);
}
///
- /// Execute the given function asynchronously on given view's UI thread. Default view is the main view.
+ /// Executes the given function asynchronously on given view's UI thread. Default view is the main view.
///
- /// returned data type of the function
+ /// Returned data type of the function
/// Synchronous function to be executed on UI thread
/// Dispatcher execution priority, default is normal
/// Awaitable Task
@@ -133,7 +133,7 @@ public static Task ExecuteOnUIThreadAsync(Func function, CoreDispatcher
///
/// Extension method for CoreDispatcher. Offering an actual awaitable Task with optional result that will be executed on the given dispatcher
///
- /// returned data type of the function
+ /// Returned data type of the function
/// Dispatcher of a thread to run
/// Asynchrounous function to be executed asynchrounously on the given dispatcher
/// Dispatcher execution priority, default is normal
@@ -142,7 +142,7 @@ public static Task AwaitableRunAsync(this CoreDispatcher dispatcher, Func<
{
if (function == null)
{
- throw new ArgumentNullException("function can't be null!");
+ throw new ArgumentNullException(nameof(function));
}
var taskCompletionSource = new TaskCompletionSource();
@@ -182,7 +182,7 @@ public static Task AwaitableRunAsync(this CoreDispatcher dispatcher, Func
{
if (function == null)
{
- throw new ArgumentNullException("function can't be null!");
+ throw new ArgumentNullException(nameof(function));
}
var taskCompletionSource = new TaskCompletionSource
/// The filename to test. Must include the file extension and is not case-sensitive.
- /// Returns true if the filename is valid.
+ /// true if the filename is valid; otherwise, false.
public static bool IsFileNameValid(string fileName)
{
var illegalChars = Path.GetInvalidFileNameChars();
@@ -617,7 +617,7 @@ public static bool IsFileNameValid(string fileName)
/// Gets a value indicating whether a file path is correct or not using the Storage feature.
///
/// The file path to test. Must include the file extension and is not case-sensitive.
- /// Returns true if the file path is valid.
+ /// true if the file path is valid; otherwise, false.
public static bool IsFilePathValid(string filePath)
{
var illegalChars = Path.GetInvalidPathChars();
@@ -634,7 +634,7 @@ public static bool IsFilePathValid(string filePath)
/// The filename of the file to search for. Must include the file extension and is not case-sensitive.
///
///
- /// Returns true, if the file exists.
+ /// true if the file exists; otherwise, false.
///
internal static async Task FileExistsInFolderAsync(StorageFolder folder, string fileName)
{
@@ -652,7 +652,7 @@ internal static async Task FileExistsInFolderAsync(StorageFolder folder, s
/// The filename of the file to search for. Must include the file extension and is not case-sensitive.
///
///
- /// Returns true, if the file exists.
+ /// true if the file exists; otherwise, false.
///
///
/// Exception thrown if the contains a quotation mark.
@@ -678,7 +678,7 @@ internal static async Task FileExistsInSubtreeAsync(StorageFolder rootFold
/// Returns a from a
///
/// Folder Id
- ///
+ /// The
internal static StorageFolder GetFolderFromKnownFolderId(KnownFolderId knownFolderId)
{
StorageFolder workingFolder;
@@ -731,4 +731,4 @@ internal static StorageFolder GetFolderFromKnownFolderId(KnownFolderId knownFold
return workingFolder;
}
}
-}
\ No newline at end of file
+}
diff --git a/Microsoft.Toolkit.Uwp/Helpers/StreamHelper.cs b/Microsoft.Toolkit.Uwp/Helpers/StreamHelper.cs
index e90e73ff4ba..7c9f4937803 100644
--- a/Microsoft.Toolkit.Uwp/Helpers/StreamHelper.cs
+++ b/Microsoft.Toolkit.Uwp/Helpers/StreamHelper.cs
@@ -22,11 +22,11 @@ public static class StreamHelper
private static HttpClient client = new HttpClient();
///
- /// Get the response stream returned by a HTTP get request.
+ /// Gets the response stream returned by a HTTP get request.
///
/// Uri to request.
- /// instance of
- /// Response stream
+ /// A used to cancel the operation.
+ /// The response stream
public static async Task GetHttpStreamAsync(this Uri uri, CancellationToken cancellationToken = default(CancellationToken))
{
var outputStream = new InMemoryRandomAccessStream();
@@ -47,11 +47,11 @@ public static async Task GetHttpStreamAsync(this Uri uri, C
}
///
- /// Get the response stream returned by a HTTP get request and save it to a local file.
+ /// Gets the response stream returned by a HTTP get request and save it to a local file.
///
/// Uri to request.
/// StorageFile to save the stream to.
- /// True if success.
+ /// A representing the asynchronous operation.
public static async Task GetHttpStreamToStorageFileAsync(
this Uri uri,
StorageFile targetFile)
@@ -72,11 +72,11 @@ public static async Task GetHttpStreamAsync(this Uri uri, C
}
///
- /// Return a stream to a specified file from the installation folder.
+ /// Gets a stream to a specified file from the installation folder.
///
/// Relative name of the file to open. Can contains subfolders.
/// File access mode. Default is read.
- /// File stream
+ /// The file stream
public static Task GetPackagedFileStreamAsync(
string fileName,
FileAccessMode accessMode = FileAccessMode.Read)
@@ -86,11 +86,11 @@ public static async Task GetHttpStreamAsync(this Uri uri, C
}
///
- /// Return a stream to a specified file from the application local folder.
+ /// Gets a stream to a specified file from the application local folder.
///
/// Relative name of the file to open. Can contains subfolders.
/// File access mode. Default is read.
- /// File stream
+ /// The file stream
public static Task GetLocalFileStreamAsync(
string fileName,
FileAccessMode accessMode = FileAccessMode.Read)
@@ -100,11 +100,11 @@ public static async Task GetHttpStreamAsync(this Uri uri, C
}
///
- /// Return a stream to a specified file from the application local cache folder.
+ /// Gets a stream to a specified file from the application local cache folder.
///
- /// Relative name of the file to open. Can contains subfolders.
+ /// Relative name of the file to open. Can contain subfolders.
/// File access mode. Default is read.
- /// File stream
+ /// The file stream
public static Task GetLocalCacheFileStreamAsync(
string fileName,
FileAccessMode accessMode = FileAccessMode.Read)
@@ -114,12 +114,12 @@ public static async Task GetHttpStreamAsync(this Uri uri, C
}
///
- /// Return a stream to a specified file from the application local cache folder.
+ /// Gets a stream to a specified file from the application local cache folder.
///
/// The well known folder ID to use
/// Relative name of the file to open. Can contains subfolders.
/// File access mode. Default is read.
- /// File stream
+ /// The file stream
public static Task GetKnowFoldersFileStreamAsync(
KnownFolderId knownFolderId,
string fileName,
@@ -130,11 +130,11 @@ public static async Task GetHttpStreamAsync(this Uri uri, C
}
///
- /// Read stream content as a string.
+ /// Reads stream content as a string.
///
/// Stream to read from.
- /// Encoding to use. Can be set to null (ASCII will be used in this case).
- /// Stream content.
+ /// Encoding to use. If set to null, ASCII will be used.
+ /// The stream content
public static async Task ReadTextAsync(
this IRandomAccessStream stream,
Encoding encoding = null)
diff --git a/Microsoft.Toolkit.Uwp/Helpers/SystemInformation.cs b/Microsoft.Toolkit.Uwp/Helpers/SystemInformation.cs
index d1e9660c04e..68444250c10 100644
--- a/Microsoft.Toolkit.Uwp/Helpers/SystemInformation.cs
+++ b/Microsoft.Toolkit.Uwp/Helpers/SystemInformation.cs
@@ -16,7 +16,7 @@
namespace Microsoft.Toolkit.Uwp.Helpers
{
///
- /// Defines class providing information of OS and application
+ /// This class provides info about the app and the system.
///
public static class SystemInformation
{
@@ -24,43 +24,31 @@ public static class SystemInformation
private static DateTime _sessionStart;
///
- /// Gets Application's name
+ /// Gets the application's name.
///
public static string ApplicationName { get; }
///
- /// Gets Application's version
+ /// Gets the application's version.
///
public static PackageVersion ApplicationVersion { get; }
///
- /// Gets the most preferred culture by the user
+ /// Gets the user's most preferred culture.
///
public static CultureInfo Culture { get; }
///
- /// Gets device's family
+ /// Gets the device's family.
///
/// Common values include:
///
- ///
- /// "Windows.Desktop"
- ///
- ///
- /// "Windows.Mobile"
- ///
- ///
- /// "Windows.Xbox"
- ///
- ///
- /// "Windows.Holographic"
- ///
- ///
- /// "Windows.Team"
- ///
- ///
- /// "Windows.IoT"
- ///
+ /// "Windows.Desktop"
+ /// "Windows.Mobile"
+ /// "Windows.Xbox"
+ /// "Windows.Holographic"
+ /// "Windows.Team"
+ /// "Windows.IoT"
///
///
/// Prepare your code for other values.
@@ -68,34 +56,34 @@ public static class SystemInformation
public static string DeviceFamily { get; }
///
- /// Gets operating system
+ /// Gets the operating system's name.
///
public static string OperatingSystem { get; }
///
- /// Gets operating system version
+ /// Gets the operating system's version.
///
public static OSVersion OperatingSystemVersion { get; }
///
- /// Gets used processor architecture
+ /// Gets the processor architecture.
///
public static ProcessorArchitecture OperatingSystemArchitecture { get; }
///
- /// Gets available memory
+ /// Gets the available memory.
///
public static float AvailableMemory => (float)MemoryManager.AppMemoryUsageLimit / 1024 / 1024;
///
- /// Gets device model.
- /// Will be empty if the device model couldn't be determined (ex: when running in a virtual machine).
+ /// Gets the device's model.
+ /// Will be empty if the model couldn't be determined (For example: when running in a virtual machine).
///
public static string DeviceModel { get; }
///
- /// Gets device's manufacturer.
- /// Will be empty if the device manufacturer couldn't be determined (ex: when running in a virtual machine).
+ /// Gets the device's manufacturer.
+ /// Will be empty if the manufacturer couldn't be determined (For example: when running in a virtual machine).
///
public static string DeviceManufacturer { get; }
@@ -118,43 +106,43 @@ public static class SystemInformation
public static PackageVersion FirstVersionInstalled { get; }
///
- /// Gets the DateTime (in UTC) when the app was launched for the first time
+ /// Gets the DateTime (in UTC) when the app was launched for the first time.
///
public static DateTime FirstUseTime { get; }
///
- /// Gets the DateTime (in UTC) when the app was previously launched, not including this instance.
- /// Will be DateTime.MinValue if `TrackAppUse` has not been called.
+ /// Gets the DateTime (in UTC) when the app was last launched, not including this instance.
+ /// Will be if has not been called yet.
///
public static DateTime LastLaunchTime { get; private set; }
///
- /// Gets the number of times the app has been launched since the last reset.
- /// Will be zero if `TrackAppUse` has not been called.
+ /// Gets the number of times the app has been launched.
+ /// Will be 0 if has not been called yet.
///
public static long LaunchCount { get; private set; }
///
/// Gets the number of times the app has been launched.
- /// Will be zero if `TrackAppUse` has not been called.
+ /// Will be 0 if has not been called yet.
///
public static long TotalLaunchCount { get; private set; }
///
/// Gets the DateTime (in UTC) that this instance of the app was launched.
- /// Will be DateTime.MinValue if `TrackAppUse` has not been called.
+ /// Will be if has not been called yet.
///
public static DateTime LaunchTime { get; private set; }
///
- /// Gets the DateTime (in UTC) when the launch count was previously reset, not including this instance.
- /// Will be DateTime.MinValue if `TrackAppUse` has not been called.
+ /// Gets the DateTime (in UTC) when the launch count was last reset.
+ /// Will be if has not been called yet.
///
public static DateTime LastResetTime { get; private set; }
///
/// Gets the length of time this instance of the app has been running.
- /// Will be TimeSpan.MinValue if `TrackAppUse` has not been called.
+ /// Will be if has not been called yet.
///
public static TimeSpan AppUptime
{
@@ -176,7 +164,7 @@ public static TimeSpan AppUptime
}
///
- /// Track app launch information
+ /// Tracks information about the app's launch.
///
/// Details about the launch request and process.
public static void TrackAppUse(LaunchActivatedEventArgs args)
@@ -233,16 +221,16 @@ void App_VisibilityChanged(Windows.UI.Core.CoreWindow sender, Windows.UI.Core.Vi
}
///
- /// Launch the store app so the user can leave a review
+ /// Launches the store app so the user can leave a review.
///
- /// A representing the asynchronous operation
+ /// A representing the asynchronous operation.
public static async Task LaunchStoreForReviewAsync()
{
await Launcher.LaunchUriAsync(new Uri(string.Format("ms-windows-store://review/?PFN={0}", Package.Current.Id.FamilyName)));
}
///
- /// Add to the record of how long the app has been running.
+ /// Adds to the record of how long the app has been running.
/// Use this to optionally include time spent in background tasks or extended execution.
///
/// The amount to time to add
@@ -253,7 +241,7 @@ public static void AddToAppUptime(TimeSpan duration)
}
///
- /// Reset launch count
+ /// Resets the launch count.
///
public static void ResetLaunchCount()
{
diff --git a/Microsoft.Toolkit.Win32/Microsoft.Toolkit.Forms.UI.Controls.WebView/Microsoft.Toolkit.Forms.UI.Controls.WebView.csproj b/Microsoft.Toolkit.Win32/Microsoft.Toolkit.Forms.UI.Controls.WebView/Microsoft.Toolkit.Forms.UI.Controls.WebView.csproj
deleted file mode 100644
index 14e5e9dcc53..00000000000
--- a/Microsoft.Toolkit.Win32/Microsoft.Toolkit.Forms.UI.Controls.WebView/Microsoft.Toolkit.Forms.UI.Controls.WebView.csproj
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
- net462
- Microsoft.Toolkit.Forms.UI.Controls
- Microsoft.Toolkit.Forms.UI.Controls.WebView
- true
-
- Windows Community Toolkit WebView Windows Forms Controls
- This library provides WebView user controls for Windows Forms. It is part of the Windows Community Toolkit.
- WebView Win32 WindowsForms
-
- $(DefineConstants);WINFORMS
-
- 10.0.17134.0
-
-
-
- $(DefineConstants);DEV_DEBUG;DEBUG_LAYOUT;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(WINDIR)\Microsoft.NET\Framework\v4.0.30319\System.Net.Http.dll
-
-
- $(WINDIR)\Microsoft.NET\Framework\v4.0.30319\System.Runtime.WindowsRuntime.dll
-
-
-
diff --git a/Microsoft.Toolkit.Win32/Microsoft.Toolkit.Forms.UI.Controls.WebView/Properties/AssemblyInfo.cs b/Microsoft.Toolkit.Win32/Microsoft.Toolkit.Forms.UI.Controls.WebView/Properties/AssemblyInfo.cs
deleted file mode 100644
index 9d9fff27852..00000000000
--- a/Microsoft.Toolkit.Win32/Microsoft.Toolkit.Forms.UI.Controls.WebView/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,13 +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.Resources;
-using System.Runtime.InteropServices;
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-[assembly: NeutralResourcesLanguage("en-US")]
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Win32/Microsoft.Toolkit.Forms.UI.Controls.WebView/TaskExtensions.cs b/Microsoft.Toolkit.Win32/Microsoft.Toolkit.Forms.UI.Controls.WebView/TaskExtensions.cs
deleted file mode 100644
index 6e47ce659a6..00000000000
--- a/Microsoft.Toolkit.Win32/Microsoft.Toolkit.Forms.UI.Controls.WebView/TaskExtensions.cs
+++ /dev/null
@@ -1,24 +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.Windows.Forms;
-
-namespace System.Threading.Tasks
-{
- ///
- /// Contains extensions to process a task within a nested Windows Forms message loop
- ///
- internal static partial class TaskExtensions
- {
- public static T WaitWithNestedMessageLoop(this Task task)
- {
- while (!task.IsCompleted)
- {
- Application.DoEvents();
- }
-
- return task.Result;
- }
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Win32/Microsoft.Toolkit.Forms.UI.Controls.WebView/WebView.BaseProperties.cs b/Microsoft.Toolkit.Win32/Microsoft.Toolkit.Forms.UI.Controls.WebView/WebView.BaseProperties.cs
deleted file mode 100644
index 5b5567cab0a..00000000000
--- a/Microsoft.Toolkit.Win32/Microsoft.Toolkit.Forms.UI.Controls.WebView/WebView.BaseProperties.cs
+++ /dev/null
@@ -1,221 +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.Drawing;
-using System.Windows.Forms;
-
-namespace Microsoft.Toolkit.Forms.UI.Controls
-{
- ///
- public partial class WebView : Control
- {
- ///
- /// Gets or sets a value indicating whether the control can accept data that the user drags onto it.
- ///
- /// if the control can accept data that the user drags onto it; otherwise, .
- /// The value of is modified.
- /// cannot be modified and is not visible in the designer.
- [Browsable(false)]
- [EditorBrowsable(EditorBrowsableState.Never)]
- [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
- public override bool AllowDrop
- {
- get => base.AllowDrop;
- set => throw new NotSupportedException();
- }
-
- ///
- /// Gets or sets the background color for the control.
- ///
- /// A that represents the background color of the control.
- /// The value of is modified.
- /// cannot be modified and is not visible in the designer.
- [Browsable(false)]
- [EditorBrowsable(EditorBrowsableState.Never)]
- [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
- public override Color BackColor
- {
- get => base.BackColor;
- set => throw new NotSupportedException();
- }
-
- ///
- /// Gets or sets the background image displayed in the control.
- ///
- /// An that represents the image to display in the background of the control.
- /// The value of is modified.
- /// cannot be modified and is not visible in the designer.
- [Browsable(false)]
- [EditorBrowsable(EditorBrowsableState.Never)]
- [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
- public override Image BackgroundImage
- {
- get => base.BackgroundImage;
- set => throw new NotSupportedException();
- }
-
- ///
- /// Gets or sets the background image layout as defined in the enumeration.
- ///
- /// One of the values of .
- /// The value of is modified.
- /// cannot be modified and is not visible in the designer.
- [Browsable(false)]
- [EditorBrowsable(EditorBrowsableState.Never)]
- [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
- public override ImageLayout BackgroundImageLayout
- {
- get => base.BackgroundImageLayout;
- set => throw new NotSupportedException();
- }
-
- ///
- /// Gets or sets the cursor that is displayed when the mouse pointer is over the control.
- ///
- /// A that represents the cursor to display when the mouse pointer is over the control.
- /// The value of is modified.
- /// cannot be modified and is not visible in the designer.
- [Browsable(false)]
- [EditorBrowsable(EditorBrowsableState.Never)]
- [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
- public override Cursor Cursor
- {
- get => base.Cursor;
- set => throw new NotSupportedException();
- }
-
- // Shadowed because the property is not virtual and we needed to override the behavior
-
- ///
- /// Gets or sets a value indicating whether the control can respond to user interaction.
- ///
- /// if the control can respond to user interaction; otherwise, .
- /// The value of is modified.
- /// cannot be modified and is not visible in the designer.
- [Browsable(false)]
- [EditorBrowsable(EditorBrowsableState.Never)]
- [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
- public new bool Enabled
- {
- get => base.Enabled;
- set => throw new NotSupportedException();
- }
-
- ///
- /// Gets or sets the font of the text displayed by the control.
- ///
- /// The to apply to the text displayed by the control.
- /// The value of is modified.
- /// cannot be modified and is not visible in the designer.
- [Browsable(false)]
- [EditorBrowsable(EditorBrowsableState.Never)]
- [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
- public override Font Font
- {
- get => base.Font;
- set => throw new NotSupportedException();
- }
-
- ///
- /// Gets or sets the foreground color of the control.
- ///
- /// The foreground of the control.
- /// The value of is modified.
- /// cannot be modified and is not visible in the designer.
- [Browsable(false)]
- [EditorBrowsable(EditorBrowsableState.Never)]
- [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
- public override Color ForeColor
- {
- get => base.ForeColor;
- set => throw new NotSupportedException();
- }
-
- // Shadowed so we can put the attributes here to hide it in the designer
-
- ///
- /// Gets or sets the Input Method Editor (IME) mode of the control.
- ///
- /// One of the values. The default is .
- /// /// The property is not visible in the designer.
- [Browsable(false)]
- [EditorBrowsable(EditorBrowsableState.Never)]
- [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
- public new ImeMode ImeMode
- {
- get => base.ImeMode;
- set => base.ImeMode = value;
- }
-
- // New so we can put the attributes here to hide it in the designer
-
- ///
- /// Gets or sets padding within the control.
- ///
- /// A representing the control's internal spacing characteristics.
- /// /// The property is not visible in the designer.
- [Browsable(false)]
- [EditorBrowsable(EditorBrowsableState.Never)]
- [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
- public new Padding Padding
- {
- get => base.Padding;
- set => base.Padding = value;
- }
-
- ///
- /// Gets or sets a value indicating whether control's elements are aligned to support locales using right-to-left fonts.
- ///
- /// One of the values.
- /// The value of the property is modified.
- /// The property cannot be modified and is not visible in the designer.
- [Browsable(false)]
- [EditorBrowsable(EditorBrowsableState.Never)]
- [Localizable(false)]
- public override RightToLeft RightToLeft
- {
- get => RightToLeft.No;
- set => throw new NotSupportedException();
- }
-
- ///
- /// Gets or sets the text associated with this control.
- ///
- /// The text displayed in the control.
- /// The value of the property is modified.
- /// The property cannot be modified and is not visible in the designer.
- [Browsable(false)]
- [EditorBrowsable(EditorBrowsableState.Never)]
- [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
- [Bindable(false)]
- public override string Text
- {
- get => string.Empty;
- set => throw new NotSupportedException();
- }
-
- ///
- /// Gets or sets a value indicating whether to use the wait cursor for the current control and all child controls.
- ///
- /// to use the wait cursor for the current control and all child controls; otherwise, .
- /// The value of the property is modified.
- /// The property cannot be modified and is not visible in the designer.
- [Browsable(false)]
- [EditorBrowsable(EditorBrowsableState.Never)]
- [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
- public new bool UseWaitCursor
- {
- get => base.UseWaitCursor;
- set => throw new NotSupportedException();
- }
-
- ///
- /// Gets the default size of the control.
- ///
- /// The default of the control.
- protected override Size DefaultSize => new Size(250, 250);
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Win32/Microsoft.Toolkit.Forms.UI.Controls.WebView/WebView.Events.cs b/Microsoft.Toolkit.Win32/Microsoft.Toolkit.Forms.UI.Controls.WebView/WebView.Events.cs
deleted file mode 100644
index d61cea783a4..00000000000
--- a/Microsoft.Toolkit.Win32/Microsoft.Toolkit.Forms.UI.Controls.WebView/WebView.Events.cs
+++ /dev/null
@@ -1,349 +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.Win32.UI.Controls;
-using Microsoft.Toolkit.Win32.UI.Controls.Interop.WinRT;
-using WebViewControlAcceleratorKeyPressedEventArgs = Microsoft.Toolkit.Win32.UI.Controls.Interop.WinRT.WebViewControlAcceleratorKeyPressedEventArgs;
-using WebViewControlContentLoadingEventArgs = Microsoft.Toolkit.Win32.UI.Controls.Interop.WinRT.WebViewControlContentLoadingEventArgs;
-using WebViewControlDOMContentLoadedEventArgs = Microsoft.Toolkit.Win32.UI.Controls.Interop.WinRT.WebViewControlDOMContentLoadedEventArgs;
-using WebViewControlLongRunningScriptDetectedEventArgs = Microsoft.Toolkit.Win32.UI.Controls.Interop.WinRT.WebViewControlLongRunningScriptDetectedEventArgs;
-using WebViewControlMoveFocusRequestedEventArgs = Microsoft.Toolkit.Win32.UI.Controls.Interop.WinRT.WebViewControlMoveFocusRequestedEventArgs;
-using WebViewControlNavigationStartingEventArgs = Microsoft.Toolkit.Win32.UI.Controls.Interop.WinRT.WebViewControlNavigationStartingEventArgs;
-using WebViewControlNewWindowRequestedEventArgs = Microsoft.Toolkit.Win32.UI.Controls.Interop.WinRT.WebViewControlNewWindowRequestedEventArgs;
-using WebViewControlPermissionRequestedEventArgs = Microsoft.Toolkit.Win32.UI.Controls.Interop.WinRT.WebViewControlPermissionRequestedEventArgs;
-using WebViewControlScriptNotifyEventArgs = Microsoft.Toolkit.Win32.UI.Controls.Interop.WinRT.WebViewControlScriptNotifyEventArgs;
-using WebViewControlUnsupportedUriSchemeIdentifiedEventArgs = Microsoft.Toolkit.Win32.UI.Controls.Interop.WinRT.WebViewControlUnsupportedUriSchemeIdentifiedEventArgs;
-using WebViewControlUnviewableContentIdentifiedEventArgs = Microsoft.Toolkit.Win32.UI.Controls.Interop.WinRT.WebViewControlUnviewableContentIdentifiedEventArgs;
-
-namespace Microsoft.Toolkit.Forms.UI.Controls
-{
- ///
- public partial class WebView : IWebView
- {
- ///
- public event EventHandler AcceleratorKeyPressed = (sender, args) => { };
-
- ///
- ///
- /// Occurs when the status of whether the current contains a full screen element or not changes.
- ///
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1009:DeclareEventHandlersCorrectly", Justification = "Declaration of WinRT type")]
- [StringResourceCategory(Constants.CategoryAction)]
- [StringResourceDescription(Constants.DescriptionWebViewContainsFullScreenElement)]
- public event EventHandler