Задать ограничения размеров окна #3

This commit is contained in:
Кристина
2026-03-27 19:40:49 +03:00
parent 4594fcbf4d
commit ec94070060
7 changed files with 20 additions and 2 deletions

View File

@@ -12,6 +12,9 @@ public class AboutWindow : Window
this.Width = 600;
this.Height = 400;
this.MinWidth = 450;
this.MinHeight = 250;
this.Background = new SolidColorBrush(Color.Parse("#2328c4"));
var AboutKeyKeeper = new TextBlock

View File

@@ -8,6 +8,8 @@ public class SettingsWindow : Window
public SettingsWindow()
{
this.Title = "Settings";
this.MinWidth = 500;
this.MinHeight = 400;
this.Width = 400;
this.Height = 300;
var textBlock = new TextBlock

View File

@@ -16,6 +16,8 @@ namespace KeyKeeper.Views
public CreateVaultFileWindow()
{
InitializeComponent();
MinWidth = 450;
MinHeight = 350;
#if DEBUG
this.AttachDevTools();
#endif

View File

@@ -16,6 +16,10 @@ public partial class EntryEditWindow : Window
public EntryEditWindow()
{
InitializeComponent();
MinWidth = 500;
MinHeight = 400;
if (PasswordEdit != null)
{
PasswordEdit.TextChanged += PasswordTextChanged;

View File

@@ -8,6 +8,8 @@ public partial class ErrorDialog : Window
public ErrorDialog(string message)
{
InitializeComponent();
MinWidth = 400;
MinHeight = 200;
MessageText.Text = message;
}

View File

@@ -18,6 +18,8 @@ namespace KeyKeeper.Views
public MainWindow()
{
InitializeComponent();
this.MinWidth = 550;
this.MinHeight = 350;
}
private async void CreateNewVault_Click(object sender, RoutedEventArgs e)
@@ -80,8 +82,7 @@ namespace KeyKeeper.Views
{
WindowStartupLocation = WindowStartupLocation.CenterScreen
};
repositoryWindow.Closed += (s, e) => this.Show();
repositoryWindow.Closed += (s, e) => this.Close();
repositoryWindow.Show();
this.Hide();
}

View File

@@ -18,6 +18,10 @@ public partial class RepositoryWindow : Window
public RepositoryWindow(RepositoryWindowViewModel model)
{
InitializeComponent();
MinWidth = 650;
MinHeight = 500;
DataContext = model;
model.ShowErrorPopup = async (string message) =>
{