c# - How to create an accordion in Xamarin.Forms ListView -
how can create accordion in listview
data binding? creating app xamarin.forms
.
this have far:
<listview x:name="list" hasunevenrows="true" > <listview.itemtemplate> <datatemplate> <viewcell> <viewcell.view> <grid padding="10,10,10,10"> <grid.rowdefinitions> <rowdefinition height="auto"></rowdefinition> <rowdefinition height="auto"></rowdefinition> </grid.rowdefinitions> <grid.columndefinitions> <columndefinition width="*" /> <columndefinition width="*" /> </grid.columndefinitions> <label text="abc:-" fontsize="20" textcolor="black" grid.column="0" grid.row ="0"/> <label text="{binding abc}" fontsize="20" textcolor="black" grid.column="1" grid.row ="0" horizontaloptions="endandexpand" verticaloptions="fillandexpand"/> <label text="xyz:-" fontsize="20" textcolor="black" grid.column="0" grid.row ="1"/> <label text="{binding xyz}" fontsize="20" textcolor="black" grid.column="1" grid.row ="1" horizontaloptions="endandexpand" verticaloptions="fillandexpand"/> </grid> </viewcell.view> </viewcell> </datatemplate> </listview.itemtemplate> </listview>
you may want check out thread below lists few options this. our accordion view not within listview
used widthrequest
, little animation make various webview
s expand , collapse.
Comments
Post a Comment