33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Input;
|
|
|
|
namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
|
{
|
|
public partial class DetailsPageWindowStateBar : UserControl
|
|
{
|
|
public DetailsPageWindowStateBar()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void MinimizeButton_Click(object sender, InputEventArgs e)
|
|
{
|
|
if (sender is UIElement senderVisual)
|
|
Window.GetWindow(senderVisual).WindowState = WindowState.Minimized;
|
|
}
|
|
|
|
private void WindowSizeButton_Click(object sender, InputEventArgs e)
|
|
{
|
|
if (sender is UIElement senderVisual)
|
|
Window.GetWindow(senderVisual).WindowState = Window.GetWindow(senderVisual).WindowState == WindowState.Maximized ? WindowState.Normal : WindowState.Maximized;
|
|
}
|
|
|
|
private void CloseButton_Click(object sender, InputEventArgs e)
|
|
{
|
|
if (sender is UIElement senderVisual)
|
|
Window.GetWindow(senderVisual).Close();
|
|
}
|
|
}
|
|
}
|