This style should apply on every control, but it has no effect, WHY?
<Style TargetType="{x:Type Control}">
<Setter Property="Margin" Value="1" />
</Style>
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.
Your statement is incorrect. Implicit Styles are only applied to the specified type, not to types that derive from it.
For example, assume you have a custom button like:
And an implicit Style like so:
In the following XMAL, the Style above would not affect MyButton: