I set it like code below, but it did not worked.
ProductList.Margin = 10 //Exception
I set it like code below, but it did not worked.
ProductList.Margin = 10 //Exception
If ProductList
is a View
you can change its padding and margin like this:
ProductList.Css.Padding = 10;
ProductList.Css.Margin = 20;
Alternatively you can use the extension methods which provide a fluent API (as they return the object back) like the following:
ProductList.Padding(10).Margin(20);
These extension methods allow you to set specific sides too. For example:
ProductList.Padding(top: 10, right: 15)
.Margin(vertical: 20); // <-- this sets both top and bottom