1

Is it possible in WPF to make a certain element - say, a Canvas containing a button - semi-transparent? All I could find so far is how to make a whole window transparent or making the background of WPF shapes transparent; but that's not what I need.

Please provide the answers either in XAML or C# - I don't speak Visual Basic.

1 Answer 1

7

Something along the lines of this perhaps? Opacity is probably what you are looking for

<Button Width="200" Height="30" Opacity="0.5">
    Click Me!
</Button>
4
  • Thanks. I always was looking for "transparency" but failed to look for "opacity". Jun 1, 2011 at 9:07
  • No problem :) Please mark the answer as accepted (by clicking the gray tick to green) so others looking for same thing would know that this question has an answer for them as well.
    – Maverik
    Jun 1, 2011 at 9:09
  • Just did it. The problem was that you answered my question too quickly and StackOverflow wouldn't let me mark your answer as accepted with the first 15 minutes or so. Jun 3, 2011 at 5:17
  • lol sorry! I didn't know it had that limit :) but thank you for coming back to do it. much appreciated :)
    – Maverik
    Jun 3, 2011 at 8:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.