mirror of
https://github.com/colhountech/DarkUI.Net5.git
synced 2025-07-23 20:11:32 +03:00
Moving form now updates splitter bounds
This commit is contained in:
parent
dc79f4dcef
commit
8aa5d67d6e
@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
@ -12,6 +11,8 @@ namespace DarkUI
|
||||
#region Field Region
|
||||
|
||||
private List<DarkDockGroup> _groups;
|
||||
|
||||
private Form _parentForm;
|
||||
private DarkDockSplitter _splitter;
|
||||
|
||||
#endregion
|
||||
@ -191,6 +192,20 @@ namespace DarkUI
|
||||
|
||||
#region Event Handler Region
|
||||
|
||||
protected override void OnCreateControl()
|
||||
{
|
||||
base.OnCreateControl();
|
||||
|
||||
_parentForm = FindForm();
|
||||
_parentForm.ResizeEnd += ParentForm_ResizeEnd;
|
||||
}
|
||||
|
||||
private void ParentForm_ResizeEnd(object sender, System.EventArgs e)
|
||||
{
|
||||
if (_splitter != null)
|
||||
_splitter.UpdateBounds();
|
||||
}
|
||||
|
||||
protected override void OnLayout(LayoutEventArgs e)
|
||||
{
|
||||
base.OnLayout(e);
|
||||
|
@ -19,6 +19,7 @@ namespace DarkUI
|
||||
public DarkTranslucentForm(Color backColor, double opacity = 0.6)
|
||||
{
|
||||
FormBorderStyle = FormBorderStyle.None;
|
||||
Size = new Size(0, 0);
|
||||
ShowInTaskbar = false;
|
||||
AllowTransparency = true;
|
||||
Opacity = opacity;
|
||||
|
Loading…
x
Reference in New Issue
Block a user