c# - uwp xaml listview with header and datatemplate -


how can add header listview in xaml? have listview datatemplate , cannot figure out how header both text blocks.

<listview name="mylistview"  grid.row="2"  isitemclickenabled="true" itemclick="listview_itemclick" >          <listview.itemcontainerstyle>             <style targettype="listviewitem">                 <setter property="horizontalcontentalignment" value="stretch"/>             </style>         </listview.itemcontainerstyle>              <listview.itemtemplate>             <datatemplate x:datatype="data:thema">                 <grid>                     <grid.columndefinitions>                         <columndefinition width="*"/>                         <columndefinition width="100"/>                         <columndefinition width="50"/>                     </grid.columndefinitions>                      <textblock fontsize="16" text="{x:bind name}" verticalalignment="center" grid.column="0" />                      <textblock fontsize="16" text="{x:bind fachid}" verticalalignment="center" grid.column="1" />                  </grid>              </datatemplate>         </listview.itemtemplate>      </listview> 

the listview gets data c# code in background: mylistview.itemssource = tempthemen; list items in it.

easier think.

<textblock grid.column="0">     <run text="name" />     <linebreak />     <run text="{x:bind name}" /> </textblock>  <textblock grid.column="1">     <run text="fachid" fontweight="bold" />     <linebreak />     <run text="{x:bind fachid}" /> </textblock> 

best of luck!


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -