vamail2
asked on
WPF binding - How to bind direction of CollectionViewSource
Hi,
I am unable to bind the Direction property of a CollectionViewSource to a dependency property in my MainWindow.Xaml.cs
I get an error that "Binding must be to a dependency property".. and it is...
CollectionViewSource x:Key="peopleView" x:Name="peopleView"
Source="{Binding Source={StaticResource people}}">
<CollectionViewSource.Sort Descriptio ns>
<scm:SortDescription PropertyName="Name" Direction="{Binding ?????}">
</scm:SortDescription>
</CollectionViewSource.Sor tDescripti ons>
</CollectionViewSource>
I am unable to bind the Direction property of a CollectionViewSource to a dependency property in my MainWindow.Xaml.cs
I get an error that "Binding must be to a dependency property".. and it is...
CollectionViewSource x:Key="peopleView" x:Name="peopleView"
Source="{Binding Source={StaticResource people}}">
<CollectionViewSource.Sort
<scm:SortDescription PropertyName="Name" Direction="{Binding ?????}">
</scm:SortDescription>
</CollectionViewSource.Sor
</CollectionViewSource>
might you have forgot the Path property...
ASKER
No. the question marks were just placeholders for posting this example
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks SriVaddadi - excellent.
ASKER
Thanks SriVaddadi