Link to home
Start Free TrialLog in
Avatar of vamail2
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.SortDescriptions>
                    <scm:SortDescription PropertyName="Name" Direction="{Binding ?????}">


                    </scm:SortDescription>

                </CollectionViewSource.SortDescriptions>

            </CollectionViewSource>
Avatar of nishant joshi
nishant joshi
Flag of India image

might you have forgot the Path property...
Avatar of vamail2
vamail2

ASKER

No.   the question marks were just placeholders for posting this example
ASKER CERTIFIED SOLUTION
Avatar of Ravi Vaddadi
Ravi Vaddadi
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of vamail2

ASKER

Thanks SriVaddadi - excellent.
Avatar of vamail2

ASKER

Thanks SriVaddadi