title: How can I display distinct value from a Observablecollection?
body: <p>I have a [Table]<code>Book</code> with columns [Column] <code>Title | Author | Editor | Genre</code></p>
  <p>I use a Pivot template with the headers Title, Author, Editor, Genre.
  Example: I have 3 books like this:</p>
  <blockquote>
  <p>1/ Title = &quot;ABC&quot; | Author = &quot;John&quot; | Editor = &quot;Jerry&quot; | Genre = &quot;Novel&quot;</p>
  <p>2/ Title = &quot;EFH&quot; | Author = &quot;John&quot; | Editor = &quot;Harry&quot; | Genre = &quot;Mystery&quot;</p>
  <p>3/ Title = &quot;HJK&quot; | Author = &quot;Tom&quot;  | Editor = &quot;Jerry&quot; | Genre = &quot;Mystery&quot;</p>
  </blockquote>
  <p><strong>What I want is in each Header just show like this</strong>:</p>
  <p>in Title header: <code>ABC  |  EFH  |  HJK</code></p>
  <p>in Author header just shows: <code>John  |  Tom</code></p>
  <p>in Editor header just shows: <code>Jerry  |  Harry</code></p>
  <p>in Genre header just shows: <code>Novel  |  Mystery</code></p>
  <p>Code:</p>
  <pre><code> &lt;!--Book--&gt;
          &lt;controls:PivotItem Header=&quot;Book&quot;&gt;
              &lt;Grid x:Name=&quot;ContentPanel1&quot; Margin=&quot;12,0,12,0&quot;&gt;
                  &lt;ListBox x:Name=&quot;TitleList&quot; SelectionChanged=&quot;TitleList_SelectionChanged&quot; ItemsSource=&quot;{Binding Data}&quot;&gt;
                      &lt;ListBox.ItemTemplate&gt;
                          &lt;DataTemplate&gt;
                              &lt;Grid Width=&quot;466&quot; Margin=&quot;0, 0, 0, 12&quot;&gt;
                                  &lt;Grid.ColumnDefinitions&gt;
                                      &lt;ColumnDefinition Width=&quot;10&quot;/&gt;
                                      &lt;ColumnDefinition Width=&quot;360&quot;/&gt;
                                      &lt;ColumnDefinition Width=&quot;Auto&quot;/&gt;
                                  &lt;/Grid.ColumnDefinitions&gt;
                                  &lt;Grid Grid.Column=&quot;0&quot;&gt;&lt;/Grid&gt;
                                  &lt;StackPanel Grid.Column=&quot;1&quot;&gt;
                                      &lt;TextBlock FontSize=&quot;40&quot;   Text=&quot;{Binding BookTitle}&quot; FontWeight=&quot;Normal&quot; FontStyle=&quot;Normal&quot; Style=&quot;{StaticResource PhoneTextTitle3Style}&quot; TextWrapping=&quot;Wrap&quot;/&gt;
                                  &lt;/StackPanel&gt;
                                  &lt;Grid Grid.Column=&quot;2&quot;&gt;
                                      &lt;Button x:Name=&quot;Deletebutton&quot; Height=&quot;60&quot; Width=&quot;60&quot; Click=&quot;deleteButton_Click&quot; BorderBrush=&quot;{StaticResource TransparentBrush}&quot;&gt;
                                       &lt;Image Source=&quot;/Assets/delete.dark.png&quot; Visibility=&quot;{StaticResource PhoneDarkThemeVisibility}&quot; Margin=&quot;-25&quot; HorizontalAlignment=&quot;Left&quot;/&gt;
                                      &lt;/Button&gt;
                                  &lt;/Grid&gt;
                              &lt;/Grid&gt;
                          &lt;/DataTemplate&gt;
                      &lt;/ListBox.ItemTemplate&gt;
                  &lt;/ListBox&gt;
              &lt;/Grid&gt;
          &lt;/controls:PivotItem&gt;
  
          &lt;!--Author--&gt;
          &lt;controls:PivotItem Header=&quot;Author&quot;&gt;
              &lt;Grid x:Name=&quot;ContentPanel2&quot; Margin=&quot;12,0,12,0&quot;&gt;
                  &lt;ListBox x:Name=&quot;AuthorList&quot;  ItemsSource=&quot;{Binding Data}&quot;&gt;
                      &lt;ListBox.ItemTemplate&gt;
                          &lt;DataTemplate&gt;
                              &lt;Grid&gt;
                                  &lt;TextBlock FontSize=&quot;40&quot;   Text=&quot;{Binding Author}&quot; FontWeight=&quot;Normal&quot; FontStyle=&quot;Normal&quot; Style=&quot;{StaticResource PhoneTextTitle3Style}&quot; TextWrapping=&quot;Wrap&quot;/&gt;
                              &lt;/Grid&gt;
                          &lt;/DataTemplate&gt;
                      &lt;/ListBox.ItemTemplate&gt;
                  &lt;/ListBox&gt;
              &lt;/Grid&gt;
          &lt;/controls:PivotItem&gt;
  
          &lt;!--Editor--&gt;
          &lt;controls:PivotItem Header=&quot;Editor&quot;&gt;
              &lt;Grid x:Name=&quot;ContentPanel3&quot; Margin=&quot;12,0,12,0&quot;&gt;
                  &lt;ListBox x:Name=&quot;EditorList&quot;  ItemsSource=&quot;{Binding Data}&quot;&gt;
                      &lt;ListBox.ItemTemplate&gt;
                          &lt;DataTemplate&gt;
                              &lt;Grid&gt;
                                  &lt;TextBlock FontSize=&quot;40&quot;   Text=&quot;{Binding Editor}&quot; FontWeight=&quot;Normal&quot; FontStyle=&quot;Normal&quot; Style=&quot;{StaticResource PhoneTextTitle3Style}&quot; TextWrapping=&quot;Wrap&quot;/&gt;
                              &lt;/Grid&gt;
                          &lt;/DataTemplate&gt;
                      &lt;/ListBox.ItemTemplate&gt;
                  &lt;/ListBox&gt;
              &lt;/Grid&gt;
          &lt;/controls:PivotItem&gt;
          &lt;!--Editor--&gt;
          &lt;controls:PivotItem Header=&quot;Editor&quot;&gt;
              &lt;Grid x:Name=&quot;ContentPanel4&quot; Margin=&quot;12,0,12,0&quot;&gt;
                  &lt;ListBox x:Name=&quot;BookImporterList&quot;  ItemsSource=&quot;{Binding Data}&quot;&gt;
                      &lt;ListBox.ItemTemplate&gt;
                          &lt;DataTemplate&gt;
                              &lt;Grid&gt;
                                  &lt;TextBlock FontSize=&quot;40&quot;   Text=&quot;{Binding Editor}&quot; FontWeight=&quot;Normal&quot; FontStyle=&quot;Normal&quot; Style=&quot;{StaticResource PhoneTextTitle3Style}&quot; TextWrapping=&quot;Wrap&quot;/&gt;
                              &lt;/Grid&gt;
                          &lt;/DataTemplate&gt;
                      &lt;/ListBox.ItemTemplate&gt;
                  &lt;/ListBox&gt;
              &lt;/Grid&gt;
          &lt;/controls:PivotItem&gt;
          &lt;!--Genre--&gt;
          &lt;controls:PivotItem Header=&quot;Genre&quot;&gt;
              &lt;Grid x:Name=&quot;ContentPanel5&quot; Margin=&quot;12,0,12,0&quot;&gt;
                  &lt;ListBox x:Name=&quot;GenreList&quot;  ItemsSource=&quot;{Binding Data}&quot;&gt;
                      &lt;ListBox.ItemTemplate&gt;
                          &lt;DataTemplate&gt;
                              &lt;Grid&gt;
                                  &lt;TextBlock FontSize=&quot;40&quot;   Text=&quot;{Binding Genre}&quot; FontWeight=&quot;Normal&quot; FontStyle=&quot;Normal&quot; Style=&quot;{StaticResource PhoneTextTitle3Style}&quot; TextWrapping=&quot;Wrap&quot;/&gt;
                              &lt;/Grid&gt;
                          &lt;/DataTemplate&gt;
                      &lt;/ListBox.ItemTemplate&gt;
                  &lt;/ListBox&gt;
              &lt;/Grid&gt;
          &lt;/controls:PivotItem&gt;
      &lt;/controls:Pivot&gt;
  </code></pre>
  <p>In my MainViewModel:</p>
  <pre><code>private ObservableCollection&lt;Book&gt; _load = new ObservableCollection&lt;Book&gt;();
  public ObservableCollection&lt;Book&gt; Load
  {
      get { return _load; }
      set
      {
          _load = value;
          NotifyPropertyChanged(&quot;Load&quot;);
      }
  }
  public void LoadData()
  {
      var orderedGenre = (from Book b in BookDB.Books select b);
  }
  </code></pre>