title: Xaml Windows phone 8
body: <p>I would like to show 6 values from the database in my corresponding page horizontally as for example
  Date|Time|Floor|Zone|Latitude|longitude
  But the page only shows 
  Data|Time|Floor|Zone 
  and does not show the latitude and longitude
  Below is my Xaml code</p>
  
  <pre><code> &lt;Grid x:Name="LayoutRoot" Background="Transparent"&gt;
      &lt;Grid.RowDefinitions&gt;
          &lt;RowDefinition Height="Auto"/&gt;
          &lt;RowDefinition Height="*"/&gt;
      &lt;/Grid.RowDefinitions&gt;
  
      &lt;!--TitlePanel contains the name of the application and page title--&gt;
      &lt;StackPanel Grid.Row="0" Margin="12,17,0,28"&gt;
          &lt;TextBlock Text="Smart Parking" Style="{StaticResource PhoneTextNormalStyle}"/&gt;
          &lt;TextBlock Text="History" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/&gt;
      &lt;/StackPanel&gt;
      &lt;!--ContentPanel - place additional content here--&gt;
      &lt;Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"&gt;
          &lt;ListBox x:Name="ListData"&gt;
              &lt;ListBox.ItemTemplate&gt;
                  &lt;DataTemplate&gt;
                              &lt;StackPanel Orientation="Horizontal"&gt;
                              &lt;TextBlock x:Name=  "DateTxt"  Text="{Binding Date}"   TextWrapping="Wrap" /&gt;
                              &lt;TextBlock x:Name=  "TimeTxt"  Text="{Binding Time}"  TextWrapping="Wrap" /&gt;
                              &lt;TextBlock x:Name=  "ZoneTxt"  Text="{Binding Zone}"  TextWrapping="Wrap"/&gt;
                              &lt;TextBlock x:Name=  "FloorTxt" Text="{Binding Floor}" TextWrapping="Wrap"/&gt;
                              &lt;TextBlock x:Name=  "LatTxt"   Text="{Binding location_latitude}" TextWrapping="Wrap"  /&gt;
                              &lt;TextBlock x:Name=  "LongTxt"  Text="{Binding location_longitude}" TextWrapping="Wrap" /&gt;
                          &lt;/StackPanel&gt;
                   &lt;/DataTemplate&gt;
              &lt;/ListBox.ItemTemplate&gt;
          &lt;/ListBox&gt; 
      &lt;/Grid&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>Can anyone please help me improve it or correct it ?</p>
  
  <p>The code behind for list itmesource is here below</p>
  
  <pre><code> public partial class History : PhoneApplicationPage
  {
  
  
  
  
  
      // string dbPath = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "db.sqlite");
      ObservableCollection&lt;historyTableSQlite&gt; DB_HistoryList = new ObservableCollection&lt;historyTableSQlite&gt;();
      DbHelper add = new DbHelper();
      public History()
      {
  
          InitializeComponent();
  
      }
  
      protected override void OnNavigatedTo(NavigationEventArgs e)
      {
          add.AddInfo();
          ReadHistoryList_Loaded();
      }
  
      public void ReadHistoryList_Loaded()
      {
          ReadAllContactsList dbhistory = new ReadAllContactsList();
          DB_HistoryList = dbhistory.GetAllHistory();//Get all DB contacts
          ListData.ItemsSource = DB_HistoryList.OrderByDescending(i =&gt; i.Id).ToList();//Latest contact ID can Display first
  
      }
  </code></pre>
  
  <p>here below is DBhelper class for all the main functions</p>
  
  <pre><code>public class DbHelper
  {
  
      SQLiteConnection dbConn;
  
      public async Task&lt;bool&gt; onCreate(string DB_PATH)
      {
          try
          {
              if (!CheckFileExists(DB_PATH).Result)
              {
                  using (dbConn = new SQLiteConnection(DB_PATH))
                  {
                      dbConn.CreateTable&lt;historyTableSQlite&gt;();
                  }
              }
              return true;
          }
          catch
          {
              return false;
          }
      }
  
  
      private async Task&lt;bool&gt; CheckFileExists(string fileName)
      {
          try
          {
              var store = await Windows.Storage.ApplicationData.Current.LocalFolder.GetFileAsync(fileName);
              return true;
          }
          catch
          {
              return false;
          }
      }
  
      //retrieve all list from the database
      public ObservableCollection&lt;historyTableSQlite&gt; ReadHistory()
      {
          using (var dbConn = new SQLiteConnection(App.DB_PATH))
          {
              List&lt;historyTableSQlite&gt; myCollection = dbConn.Table&lt;historyTableSQlite&gt;().ToList&lt;historyTableSQlite&gt;();
              ObservableCollection&lt;historyTableSQlite&gt; HistoryList = new ObservableCollection&lt;historyTableSQlite&gt;(myCollection);
              return HistoryList;
          }
      }
  
      // Insert the new info in the histrorytablesqlite table. 
      public void Insert(historyTableSQlite newcontact)
      {
          using (var dbConn = new SQLiteConnection(App.DB_PATH))
          {
              dbConn.RunInTransaction(() =&gt;
              {
                  dbConn.Insert(newcontact);
              });
          }
      }
  
      public void AddInfo()
      {
  
          DbHelper Db_helper = new DbHelper();
          Db_helper.Insert((new historyTableSQlite
          {
              Date = DateTime.Now.ToShortDateString(),
              Time = DateTime.Now.ToShortTimeString(),
              Zone = "PST",
              Floor = "10th Floor",
              latitude = 35.45112,
              longtitude = -115.42622
          }));
  
      }
  
  
  }
  </code></pre>
  
  <p>and the last  class for keeping the values</p>
  
  <pre><code>public class historyTableSQlite : INotifyPropertyChanged
  {
      [SQLite.PrimaryKey, SQLite.AutoIncrement]
  
      public int Id { get; set; }
      private int idvalue;
  
      private string dateValue = string.Empty;
  
      public string Date {
          get { return this.dateValue; }
          set
          {
              if (value != this.dateValue)
              {
                  this.dateValue = value;
                  NotifyPropertyChanged("Date");
              }
          }
      }
  
  
      private string timeValue = string.Empty;
      public string Time
      {
          get { return this.timeValue; }
          set
          {
              if (value != this.timeValue)
              {
                  this.timeValue = value;
                  NotifyPropertyChanged("Time");
              }
          }
      }
  
      private string floorValue = string.Empty;
      public string Floor
      {
          get { return this.floorValue; }
          set
          {
              if (value != this.floorValue)
              {
                  this.floorValue = value;
                  NotifyPropertyChanged("Floor");
              }
          }
      }
  
      public string zoneValue;
      public string Zone
      {
          get { return this.zoneValue; }
          set
          {
              if (value != this.zoneValue)
              {
                  this.zoneValue = value;
                  NotifyPropertyChanged("Zone");
              }
          }
      }
  
      private double latValue;
      public double latitude
      {
          get { return latValue; }
          set
          {
              if (value != this.latValue)
              {
                  this.latValue = value;
                  NotifyPropertyChanged("Latitude");
              }
          }
      }
  
      private double lonValue;
      public double longtitude
      {
          get { return this.lonValue; }
          set
          {
              if (value != this.lonValue)
              {
                  this.lonValue = value;
                  NotifyPropertyChanged("Longitude");
              }
          }
      }
  
     // public string isMarkPoint { get; set; }
  
      public historyTableSQlite()
      {
  
      }
  
      public historyTableSQlite(string date,string time,string floor,string zone,double lat,double lng)
      {
          Date = date;
          Time = time;
          Floor = floor;
          Zone = zone;
          latitude = lat;
          longtitude = lng;
      }
      public event PropertyChangedEventHandler PropertyChanged;
  
      private void NotifyPropertyChanged(String info)
      {
          if (PropertyChanged != null)
          {
              PropertyChanged(this, new PropertyChangedEventArgs(info));
          }
      }
  }
  </code></pre>