我将其设置为下面的代码,但没有工作。
ProductList.Margin = 10 //Exception
发布于 2017-04-13 05:01:33
如果ProductList
是一个View
,您可以像这样更改其填充和边距:
ProductList.Css.Padding = 10;
ProductList.Css.Margin = 20;
发布于 2017-04-13 07:57:58
或者,您可以使用扩展方法,这些方法提供了一个fluent API (当它们返回对象时),如下所示:
ProductList.Padding(10).Margin(20);
这些扩展方法也允许您设置特定的边。例如:
ProductList.Padding(top: 10, right: 15)
.Margin(vertical: 20); // <-- this sets both top and bottom
https://stackoverflow.com/questions/43377702
复制相似问题