this snip of xaml xamarin forms android application. wondering knows less baroque way of positioning , sizing full-width slider
has been scaled double size?
<grid> <grid.rowdefinitions><rowdefinition height="auto"/></grid.rowdefinitions> <grid.columndefinitions><columndefinition width="*"/><columndefinition width="2*"/><columndefinition width="*"/></grid.columndefinitions> <slider grid.row="0" grid.column="1" horizontaloptions="fillandexpand" scale="2.0" /> </grid>
this around 2 bizarre limitations/bugs in xf:
the
scale
parameter ignored layout slider sized double available space , gets clipped.the
padding
parameter not accept relative values there no way of specifying want left , right padding occupy 25% of total space available. absolute number break on different screen resolution or on screen rotation.
it seems wildly excessive have use grid
when need 1 cell!
you can use absolutelayout
make code more simple, result same:
<absolutelayout> <slider absolutelayout.layoutflags="all" absolutelayout.layoutbounds=".5, .5, .5, .5" scale="2.0"> </slider> </absolutelayout>
Comments
Post a Comment