diff --git a/MainWindow.xaml b/MainWindow.xaml
index 89bcc81..4c171ca 100644
--- a/MainWindow.xaml
+++ b/MainWindow.xaml
@@ -212,7 +212,7 @@
+ Value="Transparent" />
-
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
(button, "ActiveIndicator");
}
+ private FrameworkElement GetActiveTabIcon(Button button)
+ {
+ return button == null
+ ? null
+ : visualHelper.FindVisualChild(button, "ActiveIcon");
+ }
+
public void SetMenuAktivInaktiv(object sender, bool force, bool Silent = false)
{
Button clickedButton = (Button)sender;
@@ -914,22 +921,23 @@ namespace C4IT_CustomerPanel
if (ActiveButton != clickedButton)
{
- SolidColorBrush btnColor1 = this.ConfigSettings.GetActiveButtonColor();
- if (btnColor1 != null)
- {
- clickedButton.Background = btnColor1;
+ clickedButton.Background = Brushes.Transparent;
+ FrameworkElement activeIndicator = GetActiveTabIndicator(clickedButton);
+ if (activeIndicator != null)
+ activeIndicator.Visibility = Visibility.Visible;
+ FrameworkElement activeIcon = GetActiveTabIcon(clickedButton);
+ if (activeIcon != null)
+ activeIcon.Visibility = Visibility.Visible;
- FrameworkElement activeIndicator = GetActiveTabIndicator(clickedButton);
- if (activeIndicator != null)
- activeIndicator.Visibility = Visibility.Visible;
- }
- SolidColorBrush btnColor2 = this.ConfigSettings.GetInactiveButtonColor();
- if (btnColor2 != null && ActiveButton != null)
+ if (ActiveButton != null)
{
- ActiveButton.Background = btnColor2;
+ ActiveButton.Background = Brushes.Transparent;
FrameworkElement inactiveIndicator = GetActiveTabIndicator(ActiveButton);
if (inactiveIndicator != null)
inactiveIndicator.Visibility = Visibility.Hidden;
+ FrameworkElement inactiveIcon = GetActiveTabIcon(ActiveButton);
+ if (inactiveIcon != null)
+ inactiveIcon.Visibility = Visibility.Hidden;
}
ActiveButton = clickedButton;
}
@@ -1716,15 +1724,7 @@ namespace C4IT_CustomerPanel
if (!(sender is Button bu))
return;
- SolidColorBrush Col;
- if (!Equals(ActiveButton, bu))
- Col = ConfigSettings.GetInactiveButtonColor();
- else
- Col = ConfigSettings.GetActiveButtonColor();
-
- var convertFromString = Col;
- if (convertFromString != null)
- bu.Background = Col;
+ bu.Background = Brushes.Transparent;
}
catch (Exception exp)
{
@@ -1782,6 +1782,9 @@ namespace C4IT_CustomerPanel
FrameworkElement activeIndicator = GetActiveTabIndicator(bu);
if (activeIndicator != null)
activeIndicator.Visibility = Visibility.Visible;
+ FrameworkElement activeIcon = GetActiveTabIcon(bu);
+ if (activeIcon != null)
+ activeIcon.Visibility = Visibility.Visible;
}
catch (Exception E)
{