mirror of
https://github.com/colhountech/DarkUI.Net5.git
synced 2025-07-05 08:29:26 +03:00
(De)serialize group's visible (active) content
This commit is contained in:
parent
9a8fcb941f
commit
51047714f5
@ -272,6 +272,8 @@ namespace DarkUI.Docking
|
|||||||
}
|
}
|
||||||
|
|
||||||
groupState.Contents.Add(content.SerializationKey);
|
groupState.Contents.Add(content.SerializationKey);
|
||||||
|
|
||||||
|
groupState.VisibleContent = content.DockGroup.VisibleContent.SerializationKey;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -299,6 +301,7 @@ namespace DarkUI.Docking
|
|||||||
foreach (var group in region.Groups)
|
foreach (var group in region.Groups)
|
||||||
{
|
{
|
||||||
DarkDockContent previousContent = null;
|
DarkDockContent previousContent = null;
|
||||||
|
DarkDockContent visibleContent = null;
|
||||||
|
|
||||||
foreach (var contentKey in group.Contents)
|
foreach (var contentKey in group.Contents)
|
||||||
{
|
{
|
||||||
@ -315,7 +318,13 @@ namespace DarkUI.Docking
|
|||||||
AddContent(content, previousContent.DockGroup);
|
AddContent(content, previousContent.DockGroup);
|
||||||
|
|
||||||
previousContent = content;
|
previousContent = content;
|
||||||
|
|
||||||
|
if (group.VisibleContent == contentKey)
|
||||||
|
visibleContent = content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (visibleContent != null)
|
||||||
|
visibleContent.Select();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,8 @@ namespace DarkUI.Docking
|
|||||||
|
|
||||||
public List<string> Contents { get; set; }
|
public List<string> Contents { get; set; }
|
||||||
|
|
||||||
|
public string VisibleContent { get; set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructor Region
|
#region Constructor Region
|
||||||
|
Loading…
x
Reference in New Issue
Block a user