|
@@ -146,25 +146,30 @@ namespace InABox.DynamicGrid
|
|
|
}
|
|
|
|
|
|
private void Editor_OnEditorCreated(object sender, double height, double width)
|
|
|
+ {
|
|
|
+ }
|
|
|
+
|
|
|
+ private void Window_Closing(object sender, CancelEventArgs e)
|
|
|
+ {
|
|
|
+ if (DialogResult == true)
|
|
|
+ Form.SaveItem(e);
|
|
|
+ }
|
|
|
+
|
|
|
+ private bool bChanged = false;
|
|
|
+ private void Form_OnOnChanged(object? sender, EventArgs e)
|
|
|
+ {
|
|
|
+ bChanged = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ private void ThemableChromelessWindow_Loaded(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
var screen = WpfScreen.GetScreenFrom(new Point(Left, Top));
|
|
|
|
|
|
double spareheight = 90;
|
|
|
double sparewidth = 25;
|
|
|
|
|
|
- var desiredheight = height;
|
|
|
- var desiredwidth = width;
|
|
|
- if (Form.Pages != null)
|
|
|
- foreach (var page in Form.Pages)
|
|
|
- {
|
|
|
- if (desiredheight < page.MinimumSize().Height)
|
|
|
- desiredheight = page.MinimumSize().Height;
|
|
|
- if (desiredwidth < page.MinimumSize().Width)
|
|
|
- desiredwidth = page.MinimumSize().Width;
|
|
|
- }
|
|
|
-
|
|
|
- desiredheight += spareheight;
|
|
|
- desiredwidth += sparewidth;
|
|
|
+ var desiredheight = Form.ContentHeight + spareheight;
|
|
|
+ var desiredwidth = Form.ContentWidth + sparewidth;
|
|
|
|
|
|
var maxheight = screen.WorkingArea.Height - 0;
|
|
|
Height = desiredheight > maxheight ? maxheight : desiredheight;
|
|
@@ -178,17 +183,5 @@ namespace InABox.DynamicGrid
|
|
|
var scaption = Form.Items[0].GetType().GetCaption();
|
|
|
Title = "Edit " + scaption.SplitCamelCase();
|
|
|
}
|
|
|
-
|
|
|
- private void Window_Closing(object sender, CancelEventArgs e)
|
|
|
- {
|
|
|
- if (DialogResult == true)
|
|
|
- Form.SaveItem(e);
|
|
|
- }
|
|
|
-
|
|
|
- private bool bChanged = false;
|
|
|
- private void Form_OnOnChanged(object? sender, EventArgs e)
|
|
|
- {
|
|
|
- bChanged = true;
|
|
|
- }
|
|
|
}
|
|
|
}
|