I can specify the Margin for each stack panel element, but that will be duplication… and in case of change I will need to update all controls…
Is there any way to define that once for the stack panel?
Thank you
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.
(sorry for my bad english)
Xin answers is perfect for what you asked but if you want to set more properties for all the stackPanels I suggest you to create a style:
and use it like this:
If you remove the
x:Keyfrom the style, all StackPanels inside the element that contains the style will use that style. If you declare that style on yourapp.xaml, all stackPanels on your app will use it.