本文整理汇总了C#中Eto.Forms.DynamicLayout.SetBaseInnerLayout方法的典型用法代码示例。如果您正苦于以下问题:C# DynamicLayout.SetBaseInnerLayout方法的具体用法?C# DynamicLayout.SetBaseInnerLayout怎么用?C# DynamicLayout.SetBaseInnerLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Eto.Forms.DynamicLayout
的用法示例。
在下文中一共展示了DynamicLayout.SetBaseInnerLayout方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Generate
public override Control Generate (DynamicLayout layout)
{
if (rows.Count == 0)
return null;
int cols = rows.Where (r => r != null).Max (r => r.Items.Count);
if (Container == null) {
Container = new Panel ();
this.Layout = new TableLayout (Container, cols, rows.Count);
}
else {
this.Layout = new TableLayout (null, cols, rows.Count);
layout.SetBaseInnerLayout();
}
var tableLayout = this.Layout;
var padding = this.Padding ?? layout.DefaultPadding;
if (padding != null)
tableLayout.Padding = padding.Value;
var spacing = this.Spacing ?? layout.DefaultSpacing;
if (spacing != null)
tableLayout.Spacing = spacing.Value;
var scalingRow = new DynamicRow ();
scalingRow.Items.Add (new DynamicControl{ YScale = true });
for (int cy = 0; cy < rows.Count; cy++) {
var row = rows[cy];
if (row == null) row = scalingRow;
for (int cx = 0; cx < row.Items.Count; cx++) {
var item = row.Items[cx];
if (item == null) item = new DynamicControl { XScale = true };
item.Generate (layout, tableLayout, cx, cy);
}
}
return Container;
}