Hi I was wondering is it possible to align the toggle button on a WPF expander control to the far right side?
Share
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.
With WPF all things are possible. 😉 Unfortunately not all things are simple. Your best bet here is to re-template the expander. Start out by copying the default
Expandertemplate, found here.Next, find the
Gridthat contains 2 columns, one containing aToggleButtonand the other containing aContentPresenter. Swap the columns so the toggle is in column 1. Then change the column definition sizes so the first column is star-sized, and the second is size 20. When finished, you should have a chunk in the template that looks like this:Continue modifying the template until you get the look and feel that you need.
EDIT: The template provided on MSDN is a bare-bones version of the “real” expander template. If you want the stylized expander template, use Expression Blend and copy the existing control template off an
Expander.