This article is a mirror article of machine translation, please click here to jump to the original article.

View: 18301|Reply: 2

[WPF] Custom buttons

[Copy link]
Posted on 12/28/2017 4:17:20 PM | | |
<Applicationx:Class="WPFCustomerStyleStudy.App"             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"             StartupUri="MainWindow.xaml">    <Application.Resources>        <!--Custom colors-->        <LinearGradientBrushx:Key="LinearGradientBlueBackground"EndPoint="0.5,1"StartPoint="0.5,0">            <GradientStopColor="#FF377FED"Offset="0" />            <GradientStopColor="#FF074CC0"Offset="1" />        </LinearGradientBrush>        <Colorx:Key="MyBtnBorderColor">#FF2D78F4</Color>        <!--END-->                <Stylex:Key="MyWpfButton"TargetType="{x:Type Button}" >            <SetterProperty="Background"Value="{StaticResource LinearGradientBlueBackground}"></Setter>            <SetterProperty="Foreground"Value="White"></Setter>            <SetterProperty="BorderBrush"Value="{StaticResource MyBtnBorderColor}"></Setter>        </Style>    </Application.Resources></Application>




Previous:After the button is set to the picture, the button is displayed again?
Next:The difference between POE switches and ordinary switches
Posted on 12/29/2017 4:34:53 PM |
When publishing code, you can try to insert code, otherwise the layout will look messy
Posted on 1/9/2018 8:40:16 PM |

Thank you for sharing   
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com