Skip to content

Commit dd7a3b3

Browse files
authored
Merge branch 'master' into moreSpelling
2 parents ee7fa94 + f8b78a3 commit dd7a3b3

26 files changed

+333
-118
lines changed

Microsoft.Toolkit.HighPerformance/Microsoft.Toolkit.HighPerformance.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@
7878

7979
<!-- NETCORE_RUNTIME: to avoid issues with APIs that assume a specific memory layout, we define a
8080
.NET Core runtime constant to indicate the either .NET Core 2.1 or .NET Core 3.1. These are
81-
runtimes with the same overall memory layout for objects (in particular: strings, SZ arrays
81+
runtimes with the same overall memory layout for objects (in particular: strings, SZ arrays,
8282
and 2D arrays). We can use this constant to make sure that APIs that are exclusively available
83-
for .NET Standard targets do not make any assumtpion of any internals of the runtime being
83+
for .NET Standard targets do not make any assumption of any internals of the runtime being
8484
actually used by the consumers. -->
8585
<DefineConstants>NETSTANDARD2_1_OR_GREATER;SPAN_RUNTIME_SUPPORT;NETCORE_RUNTIME</DefineConstants>
8686
</PropertyGroup>

Microsoft.Toolkit.Uwp.SampleApp/readme.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This document describes how to add a new sample page for a new control you want
66

77

88
## 1. Add Sample page and .bind template
9-
First you need to create a Xaml page in the folder /SamplePages/YourControl. This will be the logical page used to by the app to navigate to the sample and containe code.
9+
First you need to create a Xaml page in the folder /SamplePages/YourControl. This will be the logical page used to by the app to navigate to the sample and contain code.
1010

1111
If providing 'live' XAML, a .bind file is loaded and dynamically fed to the XamlReader.Load method to convert into actual controls. This changes a few things about how samples need to be written (detailed below), but allows developers to actually change the sample and see the results live.
1212

@@ -39,11 +39,11 @@ You can define "interactive" values in this file. The value types can be:
3939
* String: You want the user to provide a text. The string is built like this @[Name:**String**:Default value]
4040
* Slider: You want the user to provide a double value. The string is built like this @[Name:**Slider**:Default value:min-max]
4141
* DoubleSlider: Same as slider but with double values (0.01 precision)
42-
* TimeSpan: You want the user to provide a duration. The string is built like this (all values in miliseconds) @[Name:**TimeSpan**:DefaultValue:min-max]
42+
* TimeSpan: You want the user to provide a duration. The string is built like this (all values in milliseconds) @[Name:**TimeSpan**:DefaultValue:min-max]
4343
* Enum: You want the user to provide a enum value. The string is built like this @[Name:**Enum**:EnumType.DefaultValue]
4444
* Brush: You want the user to select a color from a list. The string is built like this @[Name:**Brush**:Black]
4545
* Bool: You want the user to enable or disable a property. The string is built like this @[Name:**Bool**:True]
46-
* Thickness: You want the user to provide a Thicknes. The string is built like this @[Name:**Thickness**:0,20,10,0]
46+
* Thickness: You want the user to provide a Thickness. The string is built like this @[Name:**Thickness**:0,20,10,0]
4747

4848
The `Property Name` can also contain spaces, but these will be removed from the property name used for accessing the value in the property bag for any binding/access, see below.
4949

@@ -86,7 +86,7 @@ Value="@[Value:Slider:0:0-180]@"
8686
## 3. Have a *'Shallow Copy'* of your example in the sample page
8787
Even though the sample page content is ignored and the dynamic template injected, for the XamlReader to access some classes, a reference to the item is sometimes needed in the hosting app for it to be accessible. (I assume it's an optimization thing.)
8888

89-
Therefore, for any new control/extension, you should still have a simplified snippet of it contained in the sample page compiled/loaded by the app. You should remove names, events, and properties (unless extensions) from these so the namespace isn't accidently polluted. If you re-use the same control, you don't have to include it twice.
89+
Therefore, for any new control/extension, you should still have a simplified snippet of it contained in the sample page compiled/loaded by the app. You should remove names, events, and properties (unless extensions) from these so the namespace isn't accidentally polluted. If you re-use the same control, you don't have to include it twice.
9090

9191

9292
## 4. For Events/Resource Templates: Have your sample page implement the **IXamlRendererListener** interface
@@ -163,7 +163,7 @@ Select the category where you want your page to be listed and add the following
163163

164164
Some features used by samples aren't available on all the OS versions that the Sample App runs on. In order to make sure a sample is valid for the host OS, add the `ApiCheck` key/value in your JSON definition.
165165

166-
The value is a string which is the fully-qualified typename to check for the presense of. You can also accompany this with the `BadgeUpdateVersionRequred` which uses the string provided to show a short message on the sample information so uplevel implementors know the minimum version required.
166+
The value is a string which is the fully-qualified typename to check for the presence of. You can also accompany this with the `BadgeUpdateVersionRequred` which uses the string provided to show a short message on the sample information so uplevel implementors know the minimum version required.
167167

168168
```json
169169
{
@@ -190,7 +190,7 @@ Use the DocumentationUrl property to add a link to the raw documentation in *sam
190190

191191
> 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
192192

193-
> 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:
193+
> 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 example, this folder structure works best:
194194
> ```
195195
> repositories
196196
> ├── WindowsCommunityToolkit
@@ -199,4 +199,4 @@ Use the DocumentationUrl property to add a link to the raw documentation in *sam
199199

200200
### CodeUrl
201201

202-
The value of CodeUrl is modified when the app is built in release mode. The branch is automaticaly changed to **master**. This allows you to test the link in debug while pointing to dev.
202+
The value of CodeUrl is modified when the app is built in release mode. The branch is automatically changed to **master**. This allows you to test the link in debug while pointing to dev.

Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/Automation/DataGridAutomationPeer.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
// #define DEBUG_AUTOMATION
65
using System.Collections.Generic;
76
using System.Diagnostics;
87
using Microsoft.Toolkit.Uwp.UI.Controls;
@@ -184,7 +183,11 @@ protected override IList<AutomationPeer> GetChildrenCore()
184183
/// <returns>The string that contains the name.</returns>
185184
protected override string GetClassNameCore()
186185
{
187-
return Owner.GetType().Name;
186+
string classNameCore = Owner.GetType().Name;
187+
#if DEBUG_AUTOMATION
188+
Debug.WriteLine("DataGridAutomationPeer.GetClassNameCore returns " + classNameCore);
189+
#endif
190+
return classNameCore;
188191
}
189192

190193
/// <summary>
@@ -212,6 +215,10 @@ protected override string GetNameCore()
212215
}
213216
}
214217

218+
#if DEBUG_AUTOMATION
219+
Debug.WriteLine("DataGridAutomationPeer.GetNameCore returns " + name);
220+
#endif
221+
215222
return name;
216223
}
217224

Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/Automation/DataGridCellAutomationPeer.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,11 @@ protected override AutomationControlType GetAutomationControlTypeCore()
107107
/// <returns>The string that contains the name.</returns>
108108
protected override string GetClassNameCore()
109109
{
110-
return Owner.GetType().Name;
110+
string classNameCore = Owner.GetType().Name;
111+
#if DEBUG_AUTOMATION
112+
System.Diagnostics.Debug.WriteLine("DataGridCellAutomationPeer.GetClassNameCore returns " + classNameCore);
113+
#endif
114+
return classNameCore;
111115
}
112116

113117
/// <summary>

Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/Automation/DataGridColumnHeaderAutomationPeer.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ protected override AutomationControlType GetAutomationControlTypeCore()
5050
/// <returns>The string that contains the name.</returns>
5151
protected override string GetClassNameCore()
5252
{
53-
return Owner.GetType().Name;
53+
string classNameCore = Owner.GetType().Name;
54+
#if DEBUG_AUTOMATION
55+
System.Diagnostics.Debug.WriteLine("DataGridColumnHeaderAutomationPeer.GetClassNameCore returns " + classNameCore);
56+
#endif
57+
return classNameCore;
5458
}
5559

5660
/// <summary>

Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/Automation/DataGridColumnHeadersPresenterAutomationPeer.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ protected override AutomationControlType GetAutomationControlTypeCore()
3737
/// <returns>The string that contains the name.</returns>
3838
protected override string GetClassNameCore()
3939
{
40-
return Owner.GetType().Name;
40+
string classNameCore = Owner.GetType().Name;
41+
#if DEBUG_AUTOMATION
42+
System.Diagnostics.Debug.WriteLine("DataGridColumnHeadersPresenterAutomationPeer.GetClassNameCore returns " + classNameCore);
43+
#endif
44+
return classNameCore;
4145
}
4246

4347
/// <summary>

Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/Automation/DataGridDetailsPresenterAutomationPeer.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ protected override AutomationControlType GetAutomationControlTypeCore()
3737
/// <returns>The string that contains the name.</returns>
3838
protected override string GetClassNameCore()
3939
{
40-
return this.Owner.GetType().Name;
40+
string classNameCore = Owner.GetType().Name;
41+
#if DEBUG_AUTOMATION
42+
System.Diagnostics.Debug.WriteLine("DataGridDetailsPresenterAutomationPeer.GetClassNameCore returns " + classNameCore);
43+
#endif
44+
return classNameCore;
4145
}
4246

4347
/// <summary>

Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/Automation/DataGridGroupItemAutomationPeer.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,11 @@ protected override IList<AutomationPeer> GetChildrenCore()
200200
/// <returns>The string that contains the name.</returns>
201201
protected override string GetClassNameCore()
202202
{
203-
return this.OwningRowGroupHeaderPeer != null ? this.OwningRowGroupHeaderPeer.GetClassName() : string.Empty;
203+
string classNameCore = this.OwningRowGroupHeaderPeer != null ? this.OwningRowGroupHeaderPeer.GetClassName() : string.Empty;
204+
#if DEBUG_AUTOMATION
205+
Debug.WriteLine("DataGridGroupItemAutomationPeer.GetClassNameCore returns " + classNameCore);
206+
#endif
207+
return classNameCore;
204208
}
205209

206210
/// <summary>

Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/Automation/DataGridItemAutomationPeer.cs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,11 @@ protected override IList<AutomationPeer> GetChildrenCore()
151151
/// <returns>The string that contains the name.</returns>
152152
protected override string GetClassNameCore()
153153
{
154-
return (this.OwningRowPeer != null) ? this.OwningRowPeer.GetClassName() : string.Empty;
154+
string classNameCore = (this.OwningRowPeer != null) ? this.OwningRowPeer.GetClassName() : string.Empty;
155+
#if DEBUG_AUTOMATION
156+
System.Diagnostics.Debug.WriteLine("DataGridItemAutomationPeer.GetClassNameCore returns " + classNameCore);
157+
#endif
158+
return classNameCore;
155159
}
156160

157161
/// <summary>
@@ -219,11 +223,18 @@ protected override string GetNameCore()
219223
string owningRowPeerName = this.OwningRowPeer.GetName();
220224
if (!string.IsNullOrEmpty(owningRowPeerName))
221225
{
226+
#if DEBUG_AUTOMATION
227+
System.Diagnostics.Debug.WriteLine("DataGridItemAutomationPeer.GetNameCore returns " + owningRowPeerName);
228+
#endif
222229
return owningRowPeerName;
223230
}
224231
}
225232

226-
return string.Empty;
233+
string name = UI.Controls.Properties.Resources.DataGridRowAutomationPeer_ItemType;
234+
#if DEBUG_AUTOMATION
235+
System.Diagnostics.Debug.WriteLine("DataGridItemAutomationPeer.GetNameCore returns " + name);
236+
#endif
237+
return name;
227238
}
228239

229240
/// <summary>

Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/Automation/DataGridRowAutomationPeer.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ protected override AutomationControlType GetAutomationControlTypeCore()
3737
/// <returns>The string that contains the name.</returns>
3838
protected override string GetClassNameCore()
3939
{
40-
return Owner.GetType().Name;
40+
string classNameCore = Owner.GetType().Name;
41+
#if DEBUG_AUTOMATION
42+
System.Diagnostics.Debug.WriteLine("DataGridRowAutomationPeer.GetClassNameCore returns " + classNameCore);
43+
#endif
44+
return classNameCore;
4145
}
4246

4347
/// <summary>

0 commit comments

Comments
 (0)