@@ -45,6 +45,21 @@ public ColumnsViewModel ColumnsViewModel
45
45
}
46
46
}
47
47
48
+ private double maxWidthForRenameTextbox ;
49
+
50
+ public double MaxWidthForRenameTextbox
51
+ {
52
+ get => maxWidthForRenameTextbox ;
53
+ set
54
+ {
55
+ if ( value != maxWidthForRenameTextbox )
56
+ {
57
+ maxWidthForRenameTextbox = value ;
58
+ NotifyPropertyChanged ( nameof ( MaxWidthForRenameTextbox ) ) ;
59
+ }
60
+ }
61
+ }
62
+
48
63
private RelayCommand < string > UpdateSortOptionsCommand { get ; set ; }
49
64
50
65
public ScrollViewer ContentScroller { get ; private set ; }
@@ -211,7 +226,8 @@ protected override void OnNavigatedTo(NavigationEventArgs eventArgs)
211
226
IsTypeCloudDrive = InstanceViewModel . IsPageTypeCloudDrive ,
212
227
IsTypeRecycleBin = InstanceViewModel . IsPageTypeRecycleBin
213
228
} ) ;
214
- ColumnsViewModel . SetDesiredSize ( RootGrid . ActualWidth - 80 ) ;
229
+
230
+ RootGrid_SizeChanged ( null , null ) ;
215
231
}
216
232
217
233
private void FolderSettings_SortOptionPreferenceUpdated ( object sender , SortOption e )
@@ -331,6 +347,7 @@ override public void StartRenameItem()
331
347
OldItemName = textBlock . Text ;
332
348
textBlock . Visibility = Visibility . Collapsed ;
333
349
textBox . Visibility = Visibility . Visible ;
350
+ Grid . SetColumnSpan ( textBox . FindParent < Grid > ( ) , 8 ) ;
334
351
335
352
textBox . Focus ( FocusState . Pointer ) ;
336
353
textBox . LostFocus += RenameTextBox_LostFocus ;
@@ -399,6 +416,11 @@ private async void CommitRename(TextBox textBox)
399
416
400
417
private void EndRename ( TextBox textBox )
401
418
{
419
+ if ( textBox != null )
420
+ {
421
+ Grid . SetColumnSpan ( textBox . FindParent < Grid > ( ) , 1 ) ;
422
+ }
423
+
402
424
ListViewItem listViewItem = FileList . ContainerFromItem ( RenamingItem ) as ListViewItem ;
403
425
if ( textBox == null || listViewItem == null )
404
426
{
@@ -677,6 +699,7 @@ private void UpdateColumnLayout()
677
699
private void RootGrid_SizeChanged ( object sender , SizeChangedEventArgs e )
678
700
{
679
701
ColumnsViewModel . SetDesiredSize ( RootGrid . ActualWidth - 80 ) ;
702
+ MaxWidthForRenameTextbox = RootGrid . ActualWidth - 80 ;
680
703
}
681
704
682
705
private void GridSplitter_ManipulationCompleted ( object sender , ManipulationCompletedRoutedEventArgs e )
0 commit comments