File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
src/Files.App/Views/LayoutModes Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -269,7 +269,7 @@ override public void StartRenameItem()
269
269
return ;
270
270
271
271
var textBox = listViewItem . FindDescendant ( "ItemNameTextBox" ) as TextBox ;
272
- if ( textBox is null )
272
+ if ( textBox is null || textBox . FindParent < Grid > ( ) is null )
273
273
return ;
274
274
275
275
Grid . SetColumnSpan ( textBox . FindParent < Grid > ( ) , 8 ) ;
Original file line number Diff line number Diff line change @@ -188,6 +188,14 @@ protected virtual void StartRenameItem(string itemNameTextBox)
188
188
OldItemName = textBlock . Text ;
189
189
textBlock . Visibility = Visibility . Collapsed ;
190
190
textBox . Visibility = Visibility . Visible ;
191
+
192
+ if ( textBox . FindParent < Grid > ( ) is null )
193
+ {
194
+ textBlock . Visibility = Visibility . Visible ;
195
+ textBox . Visibility = Visibility . Collapsed ;
196
+ return ;
197
+ }
198
+
191
199
Grid . SetColumnSpan ( textBox . FindParent < Grid > ( ) , 8 ) ;
192
200
193
201
textBox . Focus ( FocusState . Pointer ) ;
You can’t perform that action at this time.
0 commit comments