Main Page back picture,
Add 5 function buttons and set button background and borderbrush to transparent, as if no problem, run effect
Not only has a glowing border, but when the mouse passes, the button is not transparent,
Solution 1: Set opacity to 0
Run effect
and a picture yes, perfect solution.
If there are no special requirements, you can simply set a sentence, you can remove the border
Solution 2:
1<button content="Forgot your password? "canvas.left="910"canvas.top="357"Width="154"height=" +"Background="Transparent"Foreground="#FF59A4A9"2borderthickness="0"Fontsize=" -"Name="Laforgetpassword"click="Laforgetpassword_click"style="{StaticResource {x:static Toolbar.buttonstylekey}}">
View Code
But when the mouse passes, it still shows a big button.
If you want to completely remove the border, and when the mouse will not be the original, then only the rewrite button ControlTemplate
Solution 3:
1<controltemplate x:key="Returnbutton"Targettype="{x:type Button}">2<Grid>3<Rectangle>4<Rectangle.Fill>5<imagebrush imagesource="/images/btngreynomal.png"></ImageBrush>6</Rectangle.Fill>7</Rectangle>8<contentpresenter verticalalignment="Center"Horizontalalignment="Center"Content="{TemplateBinding Content}"></ContentPresenter>9</Grid>Ten</ControlTemplate>
View Code
Add Reference
Ok!!!!!
If you also need to change the background picture of the button according to the condition, my solution is (obviously a bit stupid, also look at the point) in rewriting a ControlTemplate, replace the ImageSource,
Replace the template of the button when the condition is met, the code
Name.template = (ControlTemplate) Application.Current.TryFindResource ("Key of the resource") of the IF (condition satisfied) button;
Run
When conditions are met
Perfect removal of the borders of WPF buttons