title: StringFormat for binding TimeSpan in XAML does not work
body: <p>I have a TimeSpan variable called Time which I managed to successfully bind in XAML. Here's the code that I have:</p>
  
  <pre><code>...
  &lt;TextBlock Grid.Column="2" Text="{Binding Time, StringFormat='{}{0:hh:mm}'}" /&gt;
  ...
  </code></pre>
  
  <p>The values are now displayed properly, however, the format is still hh:mm:ss. I'm trying to get rid of the seconds and display only the hours and the minutes but for some reason the changes that I make to the StringFormat are not accounted for and I always get the same hh:mm:ss format. Can you please advise?</p>
  
  <p>Thank you!</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Judging by the comments below it seems that the Time that I have binded is not in TimeSpan format as the StringFormat seems to be correct but the displayed value is wrong.
  The Time variable is defined as follows in a custom class Record:</p>
  
  <pre><code>        private TimeSpan time;
          public TimeSpan Time
          {
              get { return time; }
              set { time = value; }
          }
  </code></pre>
  
  <p>In my code I have an observable collection defined:</p>
  
  <pre><code>ObservableCollection&lt;Record&gt; records = new ObservableCollection&lt;Record&gt;();
  </code></pre>
  
  <p>The collection is the populated an then I have:</p>
  
  <pre><code>listBoxRecords.ItemsSource = this.records;
  </code></pre>
  
  <p>Here's the full XAML, keeping in mind that the rest of the fields are correctly populated, only the TimeSpan is giving me troubles:</p>
  
  <pre><code>&lt;ListBox Margin="0,44,0,58" Name="listBoxRecords" ItemsSource="{Binding records}"&gt;
              &lt;ListBox.ItemTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;Grid Margin="4"&gt;
                          &lt;Grid.ColumnDefinitions&gt;
                              &lt;ColumnDefinition Width="120" /&gt;
                              &lt;ColumnDefinition Width="85" /&gt;
                              &lt;ColumnDefinition Width="55" /&gt;
                          &lt;/Grid.ColumnDefinitions&gt;
                          &lt;TextBlock Text="{Binding Date, StringFormat='{}{0:dd-MM-yyyy HH:mm}'}" /&gt;
                          &lt;TextBlock Grid.Column="1" Text="{Binding Type }" /&gt;
                          &lt;TextBlock Grid.Column="2" Text="{Binding Time, StringFormat='{}{0:hh\\:mm}'}" /&gt;
                      &lt;/Grid&gt;
                  &lt;/DataTemplate&gt;
              &lt;/ListBox.ItemTemplate&gt;
          &lt;/ListBox&gt;
  </code></pre>