Search code examples
c#xamarinxamarin-zebblezebble

How to set padding or margin of element in code behind in Zebble for Xamarin?


I set it like code below, but it did not worked.

ProductList.Margin = 10 //Exception

Solution

  • If ProductList is a View you can change its padding and margin like this:

    ProductList.Css.Padding = 10;
    ProductList.Css.Margin = 20;