I have an ordinary Label and want to make it half-transparent. How to do this?
Code is just:
<Label FlowDirection="RightToLeft" FontSize="40" Padding="0"
FontFamily="Arial" FontWeight="Bold"">X</Label>
I am assuming your are talking about a WPF label foreground color? Have a look at the following xaml?
<Label Content="Hallo World" Foreground="#7F000000" />
If you look at the color, the first 2 bytes is the alpha (opacity) then RGB? 0x7F == 50% or
<Label Content="Hello World" Opacity="0.5" />
Will make the whole label (foreground and background) 50% opaque!
Use the Opacity property.
This link may help:
http://books.google.co.in/books?id=JuPeu1gPU8cC&pg=PA372&lpg=PA372&dq=wpf+Label+opacity+transparent&source=bl&ots=wVI0cGtZ4a&sig=PHL7_QCfOmUcU8CwC-kYKqxvsmk&hl=en&ei=yTibTIzDBZTSuwP7hYiJBQ&sa=X&oi=book_result&ct=result&resnum=6&ved=0CC0Q6AEwBQ#v=onepage&q=wpf%20Label%20opacity%20transparent&f=false
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With