Can i create an ellipse button without override all the template?
I have a template and style for TargetType=button and i want my ellipse button get these template.
Thanks in advance
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.
Well, this works, although it’s not the most flexible solution:
Basically you just tell the button control to only show the parts which overlap with the ellipse in the OpacityMask, which is a visual brush in this case. For a quick and dirty solution this will work, although I do think that the best option would be to simply copy the default control template from here (msdn) and adapt it slightly to your use. Put it in a resource file and keep it nicely separated like that.