WPF 如何制作圆角按钮.docx

  1. 1、本文档共5页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
WPF 如何制作圆角按钮

2012-09-25 15:48 WPF————1.如何制作圆角按钮?一:Use?blend?1.?Add?new?item??2.?Select?Rectangle--Change?RadiusYand?RadiusX,?you?will?see?circle?border?3.Object?and?Timelines--select?Rectangle?click?right--Make?in?Control?4.Select?Button,?other?property?is?default,?not?need?change--OK?5.?You?will?see?circle?button?6.?You?can?select?this?button--Property--Brush--Fill--Gradient?Brush?7.Add?trigger?(When?MouseOver?and?Select),?change?background?of?Button?Trigger--Select?IsMouseOver?8.Update?background(The?same?as?6)?9.Show?default?IsMouseOver=True??10.You?can?update?this?style?that?make?the?button?more?and?more?beautiful二:Write?XAMLStyle?x:Key=ButtonStyle1?TargetType={x:Type?Button}?Setter?Property=Template?Setter.Value?ControlTemplate?TargetType={x:Type?Button}?Grid?Rectangle?x:Name=rectangle?RadiusY=15.5?RadiusX=15.5?Stroke=Black?Rectangle.Fill?LinearGradientBrush?EndPoint=0.5,1?StartPoint=0.5,0?GradientStop?Color=#FFDE111A?Offset=0/?GradientStop?Color=#FFA1070E?Offset=0.5/?GradientStop?Color=#FF8D050C?Offset=0.51/?GradientStop?Color=#FF9D080E?Offset=0.961/?/LinearGradientBrush?/Rectangle.Fill?/Rectangle?ContentPresenter?HorizontalAlignment={TemplateBinding?HorizontalContentAlignment}?RecognizesAccessKey=True?SnapsToDevicePixels={TemplateBinding?SnapsToDevicePixels}?VerticalAlignment={TemplateBinding?VerticalContentAlignment}/?/Grid?ControlTemplate.Triggers?Trigger?Property=IsFocused?Value=True/?Trigger?Property=IsDefaulted?Value=True/?Trigger?Property=IsMouseOver?Value=True?Setter?Property=Fill?TargetName=rectangle?Setter.Value?LinearGradientBrush?EndPoint=0.5,1?StartPoint=0.5,0?GradientStop?Color=#FFC2070F?Offset=0/?GradientStop?Color=#FF7E0309?Offset=0.5/?GradientStop?Color=#FF660308?Offset=0.51/?GradientStop?Color=#FF810308?Offset=0.961/?/LinearGradientBrush?/Setter.Value?/Setter?/Trigger?Trigger?Property=IsPressed?Value=True/?Trigger?Property=IsEnabled?Value=False/?/ControlTemplate.Triggers?/ControlTemplate?/Setter.Value?/Setter?/Style

文档评论(0)

sd44055 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档