Expression Blend使用笔刷

本文详细介绍了如何使用Expression Blend在WPF中绘制图形并应用各种颜色和笔刷。通过创建一个WPF应用程序,设置窗口尺寸,然后利用Gradient Brush创建线性渐变背景。文中展示了改变渐变方向、添加形状以及填充颜色的步骤,帮助读者理解WPF中颜色和笔刷的使用。
摘要由CSDN通过智能技术生成

 Expression Blend可以让我们十分方便的创建基于WPF的UI,在本文中,我会介绍如何使用WPF画图形,并使用颜色等元素去修饰图形。

 

什么是笔刷?

MSDN 是这样解释的:Everything visible on your screen is visible because it was painted by a brush. For example, a brush is used to describe the background of a button, the foreground of text, and the fill of a shape. This topic introduces the concepts of painting with Windows Presentation Foundation (WPF) brushes and provides examples. Brushes enable you to paint user interface (UI) objects with anything from simple, solid colors to complex sets of patterns and images.

我们可以这样理解:当我们要某区域的颜色的时候,我们可以使用笔刷。

 

在 WPF中,颜色是由System.Windows.Media下的Color结构体来封装的。Color有三种颜色R,G,B组成。 除了这三个属性,Color还增加了一个alpha管道属性A。它用来表示透明度(Opacity)。值为0时,表示透明(taransparent)。 值为255时,表示不透明(opaque)。默认的颜色透明度为opaque。WP

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值