本文整理匯總了C#中MonoDevelop.Components.Docking.DockGroup.CopySizeFrom方法的典型用法代碼示例。如果您正苦於以下問題:C# DockGroup.CopySizeFrom方法的具體用法?C# DockGroup.CopySizeFrom怎麽用?C# DockGroup.CopySizeFrom使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類MonoDevelop.Components.Docking.DockGroup
的用法示例。
在下文中一共展示了DockGroup.CopySizeFrom方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Copy
DockGroup Copy ()
{
DockGroup grp = new DockGroup (Frame, type);
grp.dockObjects = new List<MonoDevelop.Components.Docking.DockObject> (dockObjects);
foreach (DockObject obj in grp.dockObjects)
obj.ParentGroup = grp;
grp.CopySizeFrom (this);
return grp;
}
示例2: Split
DockGroupItem Split (DockGroupType newType, bool addFirst, DockItem obj, int npos)
{
DockGroupItem item = new DockGroupItem (Frame, obj);
if (npos == -1 || type == DockGroupType.Tabbed) {
if (ParentGroup != null && ParentGroup.Type == newType) {
// No need to split. Just add the new item as a sibling of this one.
int i = ParentGroup.Objects.IndexOf (this);
if (addFirst)
ParentGroup.Objects.Insert (i, item);
else
ParentGroup.Objects.Insert (i+1, item);
item.ParentGroup = ParentGroup;
item.ResetDefaultSize ();
}
else {
DockGroup grp = Copy ();
dockObjects.Clear ();
if (addFirst) {
dockObjects.Add (item);
dockObjects.Add (grp);
} else {
dockObjects.Add (grp);
dockObjects.Add (item);
}
item.ParentGroup = this;
item.ResetDefaultSize ();
grp.ParentGroup = this;
grp.ResetDefaultSize ();
Type = newType;
}
}
else {
DockGroup grp = new DockGroup (Frame, newType);
DockObject replaced = dockObjects[npos];
if (addFirst) {
grp.AddObject (item);
grp.AddObject (replaced);
} else {
grp.AddObject (replaced);
grp.AddObject (item);
}
grp.CopySizeFrom (replaced);
dockObjects [npos] = grp;
grp.ParentGroup = this;
}
return item;
}