How do you handle a ComboBox SelectionChanged in MVVM?

This post is quite old, but since I got the same issue. Here is how I solved it (using framework 4.0) : the idea is to use System.Windows.Interactivity. In the XAML : <ComboBox ItemsSource=”{Binding Items}”> <i:Interaction.Triggers> <i:EventTrigger EventName=”SelectionChanged”> <i:InvokeCommandAction Command=”{Binding SelectionChangedCommand}”/> </i:EventTrigger> </i:Interaction.Triggers> </ComboBox> Then you just need to implement the SelectionChangedCommand in your viewmodel.

When should I use FrameworkPropertyMetadata or UIPropertyMetadata over plain PropertyMetadata?

These classes are to report some behavior aspects of a dependency property. Check the different classes for the options they provide. For example, if you just want to back a property by dp and provide a default value, use PropertyMetadata, if you want to specify animation behavior, use UIPropertyMetadata, but if some property affects wpf … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)