本文整理汇总了C#中CSSNode.Print方法的典型用法代码示例。如果您正苦于以下问题:C# CSSNode.Print方法的具体用法?C# CSSNode.Print怎么用?C# CSSNode.Print使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSSNode
的用法示例。
在下文中一共展示了CSSNode.Print方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestPrint
public void TestPrint()
{
CSSNode parent = new CSSNode();
parent.StyleWidth = 100;
parent.StyleHeight = 120;
CSSNode child0 = new CSSNode();
child0.StyleWidth = 30;
child0.StyleHeight = 40;
CSSNode child1 = new CSSNode();
child1.StyleWidth = 35;
child1.StyleHeight = 45;
parent.Insert(0, child0);
parent.Insert(0, child1);
parent.CalculateLayout();
Assert.AreEqual(parent.Print(), "{layout: {width: 100, height: 120, top: 0, left: 0}, flexDirection: 'column', alignItems: 'stretch', flexGrow: 0, flexShrink: 0, overflow: 'visible', width: 100, height: 120, children: [\n {layout: {width: 35, height: 45, top: 0, left: 0}, flexDirection: 'column', alignItems: 'stretch', flexGrow: 0, flexShrink: 0, overflow: 'visible', width: 35, height: 45, },\n {layout: {width: 30, height: 40, top: 45, left: 0}, flexDirection: 'column', alignItems: 'stretch', flexGrow: 0, flexShrink: 0, overflow: 'visible', width: 30, height: 40, },\n]},\n");
}