I agree with you, I am also trying to use declarative code in XAML and prefer Triggers over Converters .
In most scenarios, triggers can do the same job as any converter, but Converters can have the user / business logic mentioned in pchajer.
One limitation of Triggers is that Setters in your DataTriggers can change the properties of your user interface elements; therefore, you cannot update the ViewModels property with triggers , that is, Converters win, remember the ConvertBack method.
So, you can associate your VM property with Visibility controls using the BooleanToVisibilityConverter , and even if your Visibility controls are changed by other means, your VM property will be updated ; it is usually not required why BooleanToVisibilityConverter is replaced by triggers.
So, in short -
Triggers can only perform OneWay operations, while Converters can only perform TwoWay operations
akjoshi
source share