Is there a way I can reuse Styles for more than 1 TargetType eg. ComboBox and TextBox
<Style TargetType="ComboBox, TextBox" />
is there such a thing? Or is the only way duplicate the style and target each style to differnt types?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can’t (if I’m not mistaken).
But what you may do in order to avoid copy-paste is to create a BaseStyle with a key and then create two styles for ComboBox and TextBox which are BasedOn the BaseStyle. smth like that: