How can I insert elements into a stackpanel, and they start positioned by center?
Something like this:
|_ _ x _ _ |
|_ x x _ _ |
|_ x x x _ |
The “x” are the elements, and the “_” are blank space.
Is there something already implemented?
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 could wrap your elements in a
Grid:This is the simplest approach in my opinion.
You also need to make sure that the StackPanel’s Width=”Auto” and Grid’s Width=”720″(some fixed value as needed).