I want to apply transparency to a button which contains an image, but button’s transparent seems when application start. How can ı do this?
<Button Grid.Column="1" Name="btnClose"
BorderBrush="Transparent"
Background="Transparent"
BorderThickness="0" Click="btnClose_Click">
<Image Source="close.ico" ></Image>
</Button>
and what is the method that close the-
1 – To set the overall transparency of the button you should set the
Opacityproperty to something between 0 and 1. Not sure what you want to do at application start but if you set values in XAML those are automatically applied at startup. If you want to animate it to become visible please clarify.2 – To only show the image you can override the template of the button to only show its content, add this to the Button:
3 – To exit the application when the button is clicked add this to the handler of the click event: