Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You could combine the properties into one property on your data object. For instance:</p> <pre><code>public class Person { public Person() { IsActive = true; } public string FirstName { get; set; } public string LastName { get; set; } public Boolean IsActive { get; set; } public string LastNameIsActive { get { return LastName + IsActive.ToString(); } } } </code></pre> <pre><code>&lt;Grid.Resources&gt; &lt;CollectionViewSource x:Key="view" Source="{StaticResource persons}"&gt; &lt;CollectionViewSource.SortDescriptions&gt; &lt;cm:SortDescription PropertyName="LastName" Direction="Ascending"/&gt; &lt;cm:SortDescription PropertyName="IsActive" Direction="Ascending"/&gt; &lt;/CollectionViewSource.SortDescriptions&gt; &lt;CollectionViewSource.GroupDescriptions&gt; &lt;PropertyGroupDescription PropertyName="LastNameIsActive"/&gt; &lt;/CollectionViewSource.GroupDescriptions&gt; &lt;/CollectionViewSource&gt; &lt;/Grid.Resources&gt; &lt;ListView ItemsSource="{Binding Source={StaticResource view}}"&gt; &lt;ListView.View&gt; &lt;GridView&gt; &lt;GridViewColumn Header="FirstName" DisplayMemberBinding="{Binding FirstName}"/&gt; &lt;GridViewColumn Header="LastName" DisplayMemberBinding="{Binding LastName}"/&gt; &lt;/GridView&gt; &lt;/ListView.View&gt; &lt;ListView.GroupStyle&gt; &lt;GroupStyle &gt; &lt;GroupStyle.HeaderTemplate&gt; &lt;DataTemplate&gt; &lt;TextBlock Background="Gray" DataContext="{Binding Items}"&gt; &lt;TextBlock.Text&gt; &lt;MultiBinding StringFormat="Is Active: {0} Last Name: {1}"&gt; &lt;Binding Path="IsActive"/&gt; &lt;Binding Path="LastName"/&gt; &lt;/MultiBinding&gt; &lt;/TextBlock.Text&gt; &lt;/TextBlock&gt; &lt;/DataTemplate&gt; &lt;/GroupStyle.HeaderTemplate&gt; &lt;/GroupStyle&gt; &lt;/ListView.GroupStyle&gt; &lt;/ListView&gt; </code></pre> <p></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload