I’m using the TabControl in WPF as a sort of equivalent to the ASP.Net multiview control. I need to make two of the four tabitem headers hidden. What would be the best method of doing this in XAML?
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.
I fixed this by adding DataTriggers to my Template. If my tab is DeTached (Hidden) I set the
Visibilityproperty toCollapsed. If it’s visiable again I simply set theVisibilityproperty toVisibleagain.Edit: Updated based on
@Miklós Baloghfeedback. Thanks, improved my code as well, haha. 🙂