• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Grouping and sorting with CollectionViewSource inside the Nov CTP?

P

Philippe Lavoie

#1
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 Computer

T

Tina Tam [MSFT]

#2
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 Computer

P

Philippe Lavoie

#3
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 Computer

T

Tina Tam [MSFT]

#4
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/downl...5724dc889ed6/Microsoft Windows SDK Readme.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 Computer

Users Who Are Viewing This Thread (Users: 1, Guests: 0)