@@ -54,7 +54,7 @@ public void SetRowHeight(GridLength gridLength)
5454 m_RowDefinitions [ m_CurrentRow ] . Height = gridLength ;
5555 }
5656
57- private void PushRow ( string ? text , UIElement ? control )
57+ private void PushRow ( string ? text , FrameworkElement ? control , string ? tooltip = null )
5858 {
5959 if ( text != null )
6060 {
@@ -70,6 +70,10 @@ private void PushRow(string? text, UIElement? control)
7070
7171 textBlock . SetValue ( Grid . ColumnProperty , m_CurrentColumn ) ;
7272 textBlock . SetValue ( Grid . RowProperty , m_CurrentRow ) ;
73+ if ( tooltip != null )
74+ {
75+ textBlock . ToolTip = new ToolTip { Content = tooltip } ;
76+ }
7377 Grid . Children . Add ( textBlock ) ;
7478
7579 m_CurrentColumn ++ ;
@@ -89,6 +93,10 @@ private void PushRow(string? text, UIElement? control)
8993
9094 control . SetValue ( Grid . ColumnProperty , m_CurrentColumn ) ;
9195 control . SetValue ( Grid . RowProperty , m_CurrentRow ) ;
96+ if ( tooltip != null )
97+ {
98+ control . ToolTip = new ToolTip { Content = tooltip } ;
99+ }
92100 Grid . Children . Add ( control ) ;
93101
94102 m_CurrentColumn ++ ;
@@ -122,12 +130,12 @@ public void PushRowEmptyPair()
122130 m_CurrentColumn += 3 ;
123131 }
124132
125- public void PushRowElement ( UIElement element )
133+ public void PushRowElement ( FrameworkElement element )
126134 {
127135 PushRow ( null , element ) ;
128136 }
129137
130- public void PushRowExpandElement ( UIElement element )
138+ public void PushRowExpandElement ( FrameworkElement element )
131139 {
132140 element . ClipToBounds = false ;
133141
@@ -136,20 +144,20 @@ public void PushRowExpandElement(UIElement element)
136144 PushRow ( null , canvas ) ;
137145 }
138146
139- public void PushRowPair ( string text , UIElement element )
147+ public void PushRowPair ( string text , FrameworkElement element )
140148 {
141149 PushRow ( text , element ) ;
142150 }
143151
144- public void PushRowSpacedPair ( string text , UIElement element )
152+ public void PushRowSpacedPair ( string text , FrameworkElement element , string ? tooltip = null )
145153 {
146- PushRow ( text , null ) ;
154+ PushRow ( text , null , tooltip ) ;
147155 PushRowEmpty ( ) ;
148156
149157 element . SetValue ( FrameworkElement . HorizontalAlignmentProperty , HorizontalAlignment . Left ) ;
150158 element . SetValue ( FrameworkElement . VerticalAlignmentProperty , VerticalAlignment . Center ) ;
151159
152- PushRow ( null , element ) ;
160+ PushRow ( null , element , tooltip ) ;
153161 }
154162
155163 public void PushRowTextBlock ( string text )
0 commit comments