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> 

enter image description here

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

Popular posts from this blog

Java 3D LWJGL collision -

methods - python can't use function in submodule -

c# - ErrorThe type or namespace name 'AxWMPLib' could not be found (are you missing a using directive or an assembly reference?) -