I have a Button in xaml and I want a png file of a sexy rounded button to be used as the boundary of that button.
I've tried changing the background image of the button itself but the inside of the button went transparent.
And then I clicked on Edit Template -> Edit Current and changed the background of the ButtonBackground it previews nicely but when I double click back to the control it's gone.
It does work with other images (ie. ) when I click away but not that particular one that I want (
), could it be some kind of transparency issue or bitdepth problem?
By setting the background of the button the image should appear fine and nothing wrong with it. However, r u sure that you are specifying the correct position of the image? This is an example of how the background should be set:
<Button Name="test">
<Button.Background>
<ImageBrush ImageSource="ApplicationIcon.jpg"/>
</Button.Background>
</Button>
Note that the image here is present in the project directly not in a directory inside it or else you'll have to refer to it based on the position of the xaml view.