Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/Files.App/Views/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,12 @@ public MainPage()

ApplySidebarWidthState();

#if WINDOWS
// Realize the navigation controls before the first measure pass.
FindName(nameof(InnerNavigationToolbar));
FindName(nameof(TabControl));
FindName(nameof(NavToolbar));
#endif
}

private void NumberedTabKeyboardAccelerator_Invoked(KeyboardAccelerator sender, KeyboardAcceleratorInvokedEventArgs e)
Expand Down Expand Up @@ -359,6 +361,12 @@ protected override void OnLostFocus(RoutedEventArgs e)
private void Page_Loaded(object sender, RoutedEventArgs e)
{
ViewModel.OnPageLoaded();
#if !WINDOWS
// LINUX-TODO(toolbar): realizing x:Load controls in the constructor leaves their x:Bind bindings uninitialized on Uno (toolbar row never shows), so defer to Loaded.
FindName(nameof(InnerNavigationToolbar));
FindName(nameof(TabControl));
FindName(nameof(NavToolbar));
#endif

MainWindow.Instance.AppWindow.Changed += (_, _) => MainWindow.Instance.RaiseSetTitleBarDragRegion(SetTitleBarDragRegion);

Expand Down
Loading