本文整理汇总了C#中MetroFramework.Drawing.Html.CssBox.ContainsInlinesOnly方法的典型用法代码示例。如果您正苦于以下问题:C# CssBox.ContainsInlinesOnly方法的具体用法?C# CssBox.ContainsInlinesOnly怎么用?C# CssBox.ContainsInlinesOnly使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MetroFramework.Drawing.Html.CssBox
的用法示例。
在下文中一共展示了CssBox.ContainsInlinesOnly方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BlockCorrection
/// <summary>
/// Makes block boxes be among only block boxes.
/// Inline boxes should live in a pool of Inline boxes only.
/// </summary>
/// <param name="startBox"></param>
private void BlockCorrection(CssBox startBox)
{
bool inlinesonly = startBox.ContainsInlinesOnly();
if (!inlinesonly)
{
List<List<CssBox>> inlinegroups = BlockCorrection_GetInlineGroups(startBox);
foreach (List<CssBox> group in inlinegroups)
{
if (group.Count == 0) continue;
if (group.Count == 1 && group[0] is CssAnonymousSpaceBox)
{
CssAnonymousSpaceBlockBox sbox = new CssAnonymousSpaceBlockBox(startBox, group[0]);
group[0].ParentBox = sbox;
}
else
{
CssAnonymousBlockBox newbox = new CssAnonymousBlockBox(startBox, group[0]);
foreach (CssBox inline in group)
{
inline.ParentBox = newbox;
}
}
}
}
foreach (CssBox b in startBox.Boxes)
{
BlockCorrection(b);
}
}