Skip to content

Commit 76e1d17

Browse files
authored
Merge branch 'master' into feature/mvvm-toolkit-part2
2 parents 28fdd20 + 23f31aa commit 76e1d17

12 files changed

+68
-14
lines changed

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>

Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/Automation/DataGridRowGroupHeaderAutomationPeer.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("DataGridRowGroupHeaderAutomationPeer.GetClassNameCore returns " + classNameCore);
43+
#endif
44+
return classNameCore;
4145
}
4246
}
4347
}

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@ protected override AutomationControlType GetAutomationControlTypeCore()
4545
/// <returns>The string that contains the name.</returns>
4646
protected override string GetClassNameCore()
4747
{
48-
return Owner.GetType().Name;
48+
string classNameCore = Owner.GetType().Name;
49+
#if DEBUG_AUTOMATION
50+
System.Diagnostics.Debug.WriteLine("DataGridRowHeaderAutomationPeer.GetClassNameCore returns " + classNameCore);
51+
#endif
52+
return classNameCore;
4953
}
5054

5155
/// <summary>

0 commit comments

Comments
 (0)