xaml - How to add Entry Control inside Grid View in Xamarin Forms? -


i facing problem add entry inside grid view control. have list view have data checkbox , entry. if user selects item, can add quantity of item in entry. facing issue adding entry in grid view. entry displayed half. text not displayed correctly. adding entry in xaml as.

<stacklayout>              <label text="items"></label>              <listview x:name="itemslistview" rowheight="60">                  <listview.itemtemplate>                      <datatemplate>                          <viewcell>                              <viewcell.view>                                  <grid padding="5,0" rowspacing="1" columnspacing="1" >                                         <grid.rowdefinitions>                                          <rowdefinition height="*"/>                                      </grid.rowdefinitions>                                       <grid.columndefinitions>                                          <columndefinition width="*" />                                          <columndefinition width="*" />                                          <columndefinition width="*" />                                          <columndefinition width="*" />                                      </grid.columndefinitions>                                       <label text="{binding title}" grid.columnspan="2" grid.row="1" margin="2" backgroundcolor="green"></label>                                       <common:checkbox grid.column="3" grid.row="1" heightrequest="20" widthrequest="20"                                                   verticaloptions="center" checked="{binding ischecked  ,mode=twoway}"                                                   checkedimage="checkbox_checked" uncheckedimage="checkbox_unchecked"                                                   commandparameter="{binding .}"  backgroundcolor="brown"/>                                      <entry grid.column="3" grid.row="1" isenabled="false" text="countstr" fontsize="small"  verticaloptions="end" backgroundcolor="purple" />                                   </grid>                              </viewcell.view>                          </viewcell>                      </datatemplate>                  </listview.itemtemplate>              </listview>              <button text="done" horizontaloptions="centerandexpand"                                                  commandparameter="{binding .}" clicked="button_clicked"/>  </stacklayout> 

i getting following output.

enter image description here

control purple background entry. text not displayed correctly. appreciated. in advance. have posted question in xamarin forums here.

enter image description here

<grid padding="5,0" rowspacing="1" columnspacing="1">   <grid.rowdefinitions>     <rowdefinition height="auto" />   </grid.rowdefinitions>   <grid.columndefinitions>     <columndefinition width="*" />     <columndefinition width="*" />     <columndefinition width="*" />     <columndefinition width="auto" />   </grid.columndefinitions>   <label text="apple" grid.row="0" grid.column="0" grid.columnspan="2" margin="2" verticaltextalignment="center" backgroundcolor="green" />   <switch grid.row="0" grid.column="2" verticaloptions="center" horizontaloptions="center"  backgroundcolor="brown" />   <entry text="countstr" grid.row="0" grid.column="3" isenabled="false" horizontaloptions="center" fontsize="small" backgroundcolor="purple"/> </grid> 

note: sub'd in switch vs. 3rd-party checkbox


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -