Is it possible for me to mask a portion of a control in WPF?
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.
Your question doesn’t really give a lot of detail, but I’m guessing that you want part of a control to be transparent.
Probably the best way to do that is to modify the control template of that control. That gives you complete, er, control over the appearance of that control.
To get the base ControlTemplate of any control, you can either use Expression Blend or XamlWriter to do so – here is a good link that explains both fairly simple procedures.
I don’t know what kind of control that you are interested in. Some are fairly simple, some fairly complex, and a majority are in between. Just be careful if you see a control in the template named “PART_something”. These are required, and a bit of WPF black magic to make certain controls work automatically.