I have UserControl named MyUserControl, and another UserControl named MyContainer. I want MyUserControl to have padding 10 if it is placed inside MyContainer and 15 otherwise. Shortly, I want
<MyContainer>
<MyUserControl>
Hello
</MyUserControl>
</MyContainer>
to look like
<MyContainer>
<UserControl Padding="10">
Hello
</UserControl>
<MyContainer>
and
<MyUserControl>
Hello
</MyUserControl>
to look like
<UserControl Padding="15">
Hello
</UserControl>