新增托盘图标
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace Melskin.Controls;
|
||||
@@ -193,7 +192,7 @@ public class MelWindow : Window
|
||||
if (maximizeRestoreButton is Visual maximizeButtonVisual)
|
||||
{
|
||||
var bounds = VisualTreeHelper.GetDescendantBounds(maximizeButtonVisual);
|
||||
Debug.WriteLine(bounds.ToString());
|
||||
//Debug.WriteLine(bounds.ToString());
|
||||
var buttonTransform = maximizeButtonVisual.TransformToAncestor(this);
|
||||
var buttonRect = buttonTransform.TransformBounds(bounds);
|
||||
|
||||
@@ -228,7 +227,7 @@ public class MelWindow : Window
|
||||
//VisualStateManager.GoToState(maximizeRestoreButton, "MouseOver", true);
|
||||
new SolidColorBrush((Color)ColorConverter.ConvertFromString("#1A000000")),
|
||||
"Normal" => Brushes.Transparent,
|
||||
//VisualStateManager.GoToState(maximizeRestoreButton, "Normal", true);
|
||||
//VisualStateManager.GoToState(maximizeRestoreButton, "Normal", true);
|
||||
_ => maximizeRestoreButton?.Background
|
||||
};
|
||||
}
|
||||
@@ -322,7 +321,7 @@ public class MelWindow : Window
|
||||
/// <inheritdoc />
|
||||
public override void OnApplyTemplate()
|
||||
{
|
||||
base.OnApplyTemplate();
|
||||
base.OnApplyTemplate();
|
||||
minimizeButton?.Click -= MinimizeButtonClickHandler;
|
||||
|
||||
minimizeButton = GetTemplateChild(VbMinimizeButtonName) as Button;
|
||||
|
||||
Reference in New Issue
Block a user