File tree Expand file tree Collapse file tree 12 files changed +68
-14
lines changed
Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid Expand file tree Collapse file tree 12 files changed +68
-14
lines changed Original file line number Diff line number Diff line change 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
65using System . Collections . Generic ;
76using System . Diagnostics ;
87using 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
Original file line number Diff line number Diff 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>
Original file line number Diff line number Diff 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>
Original file line number Diff line number Diff 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>
Original file line number Diff line number Diff 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>
Original file line number Diff line number Diff 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>
Original file line number Diff line number Diff 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>
Original file line number Diff line number Diff 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>
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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>
You can’t perform that action at this time.
0 commit comments