zoukankan      html  css  js  c++  java
  • WPF圆角按钮

    <ControlTemplate x:Key="CornerButton" TargetType="{x:Type Button}">
    <Border Name="buttonborder" BorderBrush="Green" BorderThickness="0" CornerRadius="15" Background="#3A98FC">
    <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center" />
    </Border>
    <ControlTemplate.Triggers>
    <Trigger Property="IsMouseOver" Value="true">
    <Setter TargetName="buttonborder" Property="Background" Value="#3A98FF"/>
    </Trigger>
    <Trigger Property="IsPressed" Value="true">
    <Setter TargetName="buttonborder" Property="Background" Value="Blue"/>
    </Trigger>
    </ControlTemplate.Triggers>
    </ControlTemplate>
    
    贡献给大家 希望大家给我点个赞。
    
    使用方法:   <Button   Foreground="White"  Template="{StaticResource CornerButton}" />
    每天进步一点点。
  • 相关阅读:
    数据类型
    python安装
    计算机基础
    Ajax--1
    ASP.net+MVC--2
    More lumber is required
    History Grading
    strcmp() Anyone?
    How Many Points of Intersection?
    Remember the Word
  • 原文地址:https://www.cnblogs.com/snow-zhang/p/10103001.html
Copyright © 2011-2022 走看看