mirror of
https://github.com/colhountech/DarkUI.Net5.git
synced 2025-07-04 16:19:25 +03:00
Region splitters now contextually added/removed.
This commit is contained in:
parent
45391b90ac
commit
7a7607c959
@ -49,7 +49,6 @@ namespace DarkUI.Docking
|
|||||||
DockArea = dockArea;
|
DockArea = dockArea;
|
||||||
|
|
||||||
BuildProperties();
|
BuildProperties();
|
||||||
CreateSplitter();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@ -78,7 +77,10 @@ namespace DarkUI.Docking
|
|||||||
|
|
||||||
// Show the region if it was previously hidden
|
// Show the region if it was previously hidden
|
||||||
if (!Visible)
|
if (!Visible)
|
||||||
|
{
|
||||||
Visible = true;
|
Visible = true;
|
||||||
|
CreateSplitter();
|
||||||
|
}
|
||||||
|
|
||||||
PositionGroups();
|
PositionGroups();
|
||||||
}
|
}
|
||||||
@ -96,7 +98,10 @@ namespace DarkUI.Docking
|
|||||||
|
|
||||||
// If we just removed the final group, and this isn't the document region, then hide
|
// If we just removed the final group, and this isn't the document region, then hide
|
||||||
if (_groups.Count == 0 && DockArea != DarkDockArea.Document)
|
if (_groups.Count == 0 && DockArea != DarkDockArea.Document)
|
||||||
|
{
|
||||||
Visible = false;
|
Visible = false;
|
||||||
|
RemoveSplitter();
|
||||||
|
}
|
||||||
|
|
||||||
PositionGroups();
|
PositionGroups();
|
||||||
}
|
}
|
||||||
@ -263,6 +268,12 @@ namespace DarkUI.Docking
|
|||||||
DockPanel.Splitters.Add(_splitter);
|
DockPanel.Splitters.Add(_splitter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void RemoveSplitter()
|
||||||
|
{
|
||||||
|
if (DockPanel.Splitters.Contains(_splitter))
|
||||||
|
DockPanel.Splitters.Remove(_splitter);
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Event Handler Region
|
#region Event Handler Region
|
||||||
|
Loading…
x
Reference in New Issue
Block a user