diff --git a/PettingZoo/UI/Main/MainWindow.xaml b/PettingZoo/UI/Main/MainWindow.xaml index b0fa1a7..6a65b2e 100644 --- a/PettingZoo/UI/Main/MainWindow.xaml +++ b/PettingZoo/UI/Main/MainWindow.xaml @@ -24,7 +24,7 @@ - + diff --git a/PettingZoo/UI/Main/MainWindow.xaml.cs b/PettingZoo/UI/Main/MainWindow.xaml.cs index ea1b01d..87737be 100644 --- a/PettingZoo/UI/Main/MainWindow.xaml.cs +++ b/PettingZoo/UI/Main/MainWindow.xaml.cs @@ -116,6 +116,18 @@ namespace PettingZoo.UI.Main public double TabWidth => SubscriberTabs.ActualWidth; public double TabHeight => SubscriberTabs.ActualHeight; + + private void Toolbar_Loaded(object sender, RoutedEventArgs e) + { + // Hide arrow on the right side of the toolbar + var toolBar = sender as ToolBar; + + if (toolBar?.Template.FindName("OverflowGrid", toolBar) is FrameworkElement overflowGrid) + overflowGrid.Visibility = Visibility.Collapsed; + + if (toolBar?.Template.FindName("MainPanelBorder", toolBar) is FrameworkElement mainPanelBorder) + mainPanelBorder.Margin = new Thickness(0); + } } #pragma warning restore CA1001 } diff --git a/PettingZoo/UI/Tab/Subscriber/SubscriberView.xaml b/PettingZoo/UI/Tab/Subscriber/SubscriberView.xaml index deef3cc..95a1f1b 100644 --- a/PettingZoo/UI/Tab/Subscriber/SubscriberView.xaml +++ b/PettingZoo/UI/Tab/Subscriber/SubscriberView.xaml @@ -5,6 +5,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:ui="clr-namespace:PettingZoo.UI" xmlns:res="clr-namespace:PettingZoo.UI.Tab.Subscriber" + xmlns:svgc="http://sharpvectors.codeplex.com/svgc/" mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800" @@ -48,11 +49,21 @@ + - + + + + + + + + + + - - + + diff --git a/PettingZoo/UI/Tab/Subscriber/SubscriberView.xaml.cs b/PettingZoo/UI/Tab/Subscriber/SubscriberView.xaml.cs index e0220f8..e848167 100644 --- a/PettingZoo/UI/Tab/Subscriber/SubscriberView.xaml.cs +++ b/PettingZoo/UI/Tab/Subscriber/SubscriberView.xaml.cs @@ -1,4 +1,6 @@ using System.Collections.Generic; +using System.Windows; +using System.Windows.Controls; using System.Windows.Media; namespace PettingZoo.UI.Tab.Subscriber @@ -17,5 +19,17 @@ namespace PettingZoo.UI.Tab.Subscriber if (!System.ComponentModel.DesignerProperties.GetIsInDesignMode(this)) Background = Brushes.Transparent; } + + private void Toolbar_Loaded(object sender, RoutedEventArgs e) + { + // Hide arrow on the right side of the toolbar + var toolBar = sender as ToolBar; + + if (toolBar?.Template.FindName("OverflowGrid", toolBar) is FrameworkElement overflowGrid) + overflowGrid.Visibility = Visibility.Collapsed; + + if (toolBar?.Template.FindName("MainPanelBorder", toolBar) is FrameworkElement mainPanelBorder) + mainPanelBorder.Margin = new Thickness(0); + } } } diff --git a/PettingZoo/UI/Tab/Undocked/UndockedTabHostWindow.xaml b/PettingZoo/UI/Tab/Undocked/UndockedTabHostWindow.xaml index bb5ba3e..2b9b461 100644 --- a/PettingZoo/UI/Tab/Undocked/UndockedTabHostWindow.xaml +++ b/PettingZoo/UI/Tab/Undocked/UndockedTabHostWindow.xaml @@ -12,7 +12,7 @@ Width="800" WindowStyle="ThreeDBorderWindow"> - + diff --git a/PettingZoo/UI/Tab/Undocked/UndockedTabHostWindow.xaml.cs b/PettingZoo/UI/Tab/Undocked/UndockedTabHostWindow.xaml.cs index 52ede6b..21ac421 100644 --- a/PettingZoo/UI/Tab/Undocked/UndockedTabHostWindow.xaml.cs +++ b/PettingZoo/UI/Tab/Undocked/UndockedTabHostWindow.xaml.cs @@ -1,4 +1,5 @@ using System.Windows; +using System.Windows.Controls; namespace PettingZoo.UI.Tab.Undocked { @@ -30,5 +31,17 @@ namespace PettingZoo.UI.Tab.Undocked viewModel.WindowClosed(); }; } + + private void Toolbar_Loaded(object sender, RoutedEventArgs e) + { + // Hide arrow on the right side of the toolbar + var toolBar = sender as ToolBar; + + if (toolBar?.Template.FindName("OverflowGrid", toolBar) is FrameworkElement overflowGrid) + overflowGrid.Visibility = Visibility.Collapsed; + + if (toolBar?.Template.FindName("MainPanelBorder", toolBar) is FrameworkElement mainPanelBorder) + mainPanelBorder.Margin = new Thickness(0); + } } }