windows phone 8 - XamarinForms ListView item fill with -
how can force templateitem expand , fill entire width of listview?
as can see in screenshot, listview has red background, , items have white background.
the code of datatemplate:
<datatemplate x:key="informationmessagetemplate"> <stacklayout orientation="horizontal" backgroundcolor="#ffffff" horizontaloptions="fillandexpand"> <label fontattributes="bold" text="{binding sender}" /> <label text=" chegou na sala" horizontaloptions="fillandexpand"/> </stacklayout> </datatemplate> 
try putting stacklayout in viewcell:
<datatemplate x:key="informationmessagetemplate"> <viewcell> <viewcell.view> <stacklayout orientation="horizontal" backgroundcolor="#ffffff" horizontaloptions="fillandexpand"> <label fontattributes="bold" text="{binding sender}" /> <label text=" chegou na sala" horizontaloptions="fillandexpand"/> </stacklayout> </viewcell.view> </viewcell> </datatemplate>
Comments
Post a Comment