In a MVVM project I want to apply the style "ReadOnlyTextBox" to a control only if a property exposed by the viewmodel is set to true. I thought I could use a trigger but unfortunately I learnt from here
Style Trigger to Apply another Style
and here
How to make Style.Triggers trigger a different named style to be applied
that I cannot change a style property inside a style definition. I'm looking for a simple alternative way, otherwise I will use the trigger for applying all the properties contained inside the style "ReadOnlyTextBox". I don't like this approach because it violates the DRY principle so I hope you can suggest something else.
Thanks Filippo