c# - ListBox TextBlock item alignment in Grid column Windows Phone -
i have problem horizontalalignment of textblock in listbox itemtemplate. part of code:
<listbox x:name="meallist" itemssource="{binding meals}" > <listbox.itemtemplate> <datatemplate> <grid> <grid.columndefinitions> <columndefinition width="*"/> <columndefinition width="auto"/> </grid.columndefinitions> <textblock text="{binding name}" margin="10" grid.column="0" textwrapping="wrap" style="{staticresource phonetextsmallstyle}"/> <textblock text="{binding price}" grid.column="1" horizontalalignment="right" verticalalignment="center" style="{staticresource phonetextsmallstyle}"/> </grid> </datatemplate> </listbox.itemtemplate> </listbox>
in app have list of things:
but want, right column "xx,- kč" has horizontalalignment="right". every item in column should on righ side of screen , below previous item. second column in second row should below second column in first row. understand?
can me? can post more of code.
Comments
Post a Comment