internal override void OnRefreshTitleBarControls(OuterFrame mainFrame, double totalWidth) { if (mainFrame.TitleContent.Content == null) { mainFrame.TitleContent.Content = TitlePanel; } }
internal override void OnRefreshTitleBarControls(OuterFrame mainFrame, double totalWidth) { if (mainFrame.TitleContent.Content == null) { mainFrame.TitleContent.Content = new TextBlock() { RequestedTheme = ElementTheme.Dark, VerticalAlignment = VerticalAlignment.Center, FontSize = 32, Text = "Settings" } } ; } }
internal override void OnRefreshTitleBarControls(OuterFrame mainFrame, double totalWidth) { bool draggable = mainFrame.SystemButtonsWidth > 0; bool showTitle = draggable && totalWidth >= 500; bool showControls = (draggable && totalWidth >= 750) || (!draggable && totalWidth >= 450); if (totalWidth < 40) { return; } if (showTitle && mainFrame.TitleContent.Content != TitlePanel) { mainFrame.TitleContent.Content = TitlePanel; SearchBox.Width = 250; SearchBox.Margin = new Thickness(8, 9, 0, 9); } if (showControls && !TitleOverlayPanel.Children.Contains(MainControlBar)) { MainGrid.Children.Remove(MainControlBar); TitleOverlayPanel.Children.Add(MainControlBar); } if (!showControls && TitleOverlayPanel.Children.Contains(MainControlBar)) { TitleOverlayPanel.Children.Remove(MainControlBar); MainGrid.Children.Add(MainControlBar); } if (!showTitle) { if (mainFrame.TitleContent.Content != null) { mainFrame.TitleContent.Content = null; } if (showControls) { SearchBox.Width = totalWidth - 2 - MainControlBar.EstimateWidth(); } else { SearchBox.Width = totalWidth - 2; } SearchBox.Margin = new Thickness(0, 9, 2, 9); } if (mainFrame.TitleOverlay.Content != TitleOverlayPanel) { mainFrame.TitleOverlay.Content = TitleOverlayPanel; } }
internal virtual void OnRefreshTitleBarControls(OuterFrame mainFrame, double totalWidth) { }
internal override void OnRefreshTitleBarControls(OuterFrame mainFrame, double totalWidth) { bool draggable = mainFrame.SystemButtonsWidth > 0; bool showTitle = draggable && totalWidth >= 500; bool showControls = (draggable && totalWidth >= 750) || (!draggable && totalWidth >= 450); if (totalWidth < 40) return; if (showTitle && mainFrame.TitleContent.Content != TitlePanel) { mainFrame.TitleContent.Content = TitlePanel; SearchBox.Width = 250; SearchBox.Margin = new Thickness(8, 9, 0, 9); } if (showControls && !TitleOverlayPanel.Children.Contains(MainControlBar)) { MainGrid.Children.Remove(MainControlBar); TitleOverlayPanel.Children.Add(MainControlBar); } if (!showControls && TitleOverlayPanel.Children.Contains(MainControlBar)) { TitleOverlayPanel.Children.Remove(MainControlBar); MainGrid.Children.Add(MainControlBar); } if (!showTitle) { if (mainFrame.TitleContent.Content != null) mainFrame.TitleContent.Content = null; if (showControls) { SearchBox.Width = totalWidth - 2 - MainControlBar.EstimateWidth(); } else { SearchBox.Width = totalWidth - 2; } SearchBox.Margin = new Thickness(0, 9, 2, 9); } if (mainFrame.TitleOverlay.Content != TitleOverlayPanel) { mainFrame.TitleOverlay.Content = TitleOverlayPanel; } }
internal override void OnRefreshTitleBarControls(OuterFrame mainFrame, double totalWidth) { if (mainFrame.TitleContent.Content == null) mainFrame.TitleContent.Content = new TextBlock() { RequestedTheme = ElementTheme.Dark, VerticalAlignment = VerticalAlignment.Center, FontSize = 32, Text = "Settings" }; }
internal override void OnRefreshTitleBarControls(OuterFrame mainFrame, double totalWidth) { if (mainFrame.TitleContent.Content == null) mainFrame.TitleContent.Content = TitlePanel; }