Windows Vista Forums

Grouping and sorting with CollectionViewSource inside the Nov CTP?

  1. #1


    Philippe Lavoie Guest

    Grouping and sorting with CollectionViewSource inside the Nov CTP?

    Hi

    I'm trying to get grouping and sorting working with the Nov CTP and I
    can't find any up-to-date documentation on that class. Can someone point
    me to a working sample?

    Many thanks

    Phil

      My System SpecsSystem Spec

  2.   


  3. #2


    Tina Tam [MSFT] Guest

    Re: Grouping and sorting with CollectionViewSource inside the Nov CTP?

    Hi Philippe,

    If you have the Nov CTP SDK documentation, you should be able to see an
    example on the CollectionViewSource class page (with a link to a
    CollectionViewSource sample), or is that not what you're looking for?
    Here's a snippet from that example:
    <Window.Resources>

    <src:Places x:Key="places"/>

    <CollectionViewSource Source="{StaticResource places}" x:Key="cvs">
    <CollectionViewSource.SortDescriptions>
    <scm:SortDescription PropertyName="CityName"/>
    </CollectionViewSource.SortDescriptions>
    <CollectionViewSource.GroupDescriptions>
    <dat:PropertyGroupDescription PropertyName="State"/>
    </CollectionViewSource.GroupDescriptions>
    </CollectionViewSource>

    </Window.Resources>
    <DockPanel>
    <ListBox ItemsSource="{Binding Source={StaticResource cvs}}"
    DisplayMemberPath="CityName" Name="lb">
    <ListBox.GroupStyle>
    <x:Static Member="GroupStyle.Default"/>
    </ListBox.GroupStyle>
    </ListBox>
    </DockPanel>Thanks,
    Tina
    --
    This posting is provided "AS IS" with no warranties, and confers no rights.

    "Philippe Lavoie" <philippe.lavoie@cactus.ca> wrote in message
    news:%23xOBSbNAGHA.3936@TK2MSFTNGP12.phx.gbl...
    > Hi
    >
    > I'm trying to get grouping and sorting working with the Nov CTP and I
    > can't find any up-to-date documentation on that class. Can someone point
    > me to a working sample?
    >
    > Many thanks
    >
    > Phil




      My System SpecsSystem Spec

  4. #3


    Philippe Lavoie Guest

    Re: Grouping and sorting with CollectionViewSource inside the NovCTP?

    Thanks Tina

    I was so sure that the samples were not working that I didn't even
    bother looking there Instead I looked on the web and none of the
    information works with the Nov CTP (even MSDN which is kind of strange).

    I will look there next time

    Phil

    Tina Tam [MSFT] wrote:
    > Hi Philippe,
    >
    > If you have the Nov CTP SDK documentation, you should be able to see an
    > example on the CollectionViewSource class page (with a link to a
    > CollectionViewSource sample), or is that not what you're looking for?
    > Here's a snippet from that example:
    > <Window.Resources>
    >
    > <src:Places x:Key="places"/>
    >
    > <CollectionViewSource Source="{StaticResource places}" x:Key="cvs">
    > <CollectionViewSource.SortDescriptions>
    > <scm:SortDescription PropertyName="CityName"/>
    > </CollectionViewSource.SortDescriptions>
    > <CollectionViewSource.GroupDescriptions>
    > <dat:PropertyGroupDescription PropertyName="State"/>
    > </CollectionViewSource.GroupDescriptions>
    > </CollectionViewSource>
    >
    > </Window.Resources>
    > <DockPanel>
    > <ListBox ItemsSource="{Binding Source={StaticResource cvs}}"
    > DisplayMemberPath="CityName" Name="lb">
    > <ListBox.GroupStyle>
    > <x:Static Member="GroupStyle.Default"/>
    > </ListBox.GroupStyle>
    > </ListBox>
    > </DockPanel>Thanks,
    > Tina




      My System SpecsSystem Spec

  5. #4


    Tina Tam [MSFT] Guest

    Re: Grouping and sorting with CollectionViewSource inside the Nov CTP?

    Ah, I see. Just FYI, MSDN has a different refresh schedule. The content
    there is only refreshed when there is a major milestone (such as a beta, but
    not a CTP). Therefore the Nov CTP SDK docs are more up-to-date than the
    online docs.

    Also, the samples that don't compile in the Nov version of the SDK are
    documented here:
    http://download.microsoft.com/downlo...K%20Readme.htm

    Hope that helps,
    Tina
    --
    This posting is provided "AS IS" with no warranties, and confers no rights.

    "Philippe Lavoie" <philippe.lavoie@cactus.ca> wrote in message
    news:uWtu5iYAGHA.2036@TK2MSFTNGP14.phx.gbl...
    > Thanks Tina
    >
    > I was so sure that the samples were not working that I didn't even bother
    > looking there Instead I looked on the web and none of the information
    > works with the Nov CTP (even MSDN which is kind of strange).
    >
    > I will look there next time
    >
    > Phil
    >
    > Tina Tam [MSFT] wrote:
    >> Hi Philippe,
    >>
    >> If you have the Nov CTP SDK documentation, you should be able to see an
    >> example on the CollectionViewSource class page (with a link to a
    >> CollectionViewSource sample), or is that not what you're looking for?
    >> Here's a snippet from that example:
    >> <Window.Resources>
    >>
    >> <src:Places x:Key="places"/>
    >>
    >> <CollectionViewSource Source="{StaticResource places}" x:Key="cvs">
    >> <CollectionViewSource.SortDescriptions>
    >> <scm:SortDescription PropertyName="CityName"/>
    >> </CollectionViewSource.SortDescriptions>
    >> <CollectionViewSource.GroupDescriptions>
    >> <dat:PropertyGroupDescription PropertyName="State"/>
    >> </CollectionViewSource.GroupDescriptions>
    >> </CollectionViewSource>
    >>
    >> </Window.Resources>
    >> <DockPanel>
    >> <ListBox ItemsSource="{Binding Source={StaticResource cvs}}"
    >> DisplayMemberPath="CityName" Name="lb">
    >> <ListBox.GroupStyle>
    >> <x:Static Member="GroupStyle.Default"/>
    >> </ListBox.GroupStyle>
    >> </ListBox>
    >> </DockPanel>Thanks,
    >> Tina

    >
    >




      My System SpecsSystem Spec


Grouping and sorting with CollectionViewSource inside the Nov CTP?
Similar Threads
Thread Forum
Sorting, Grouping and Stacking Vista file management
Sorting, Grouping and Stacking Vista General
Sorting, Grouping and Stacking Vista file management
grouping / sorting files General Discussion
Sorting, grouping data PowerShell