当前位置: 首页 > news >正文

网站开发的工作经验要求微信公众平台做微网站

网站开发的工作经验要求,微信公众平台做微网站,做韩国网站有哪些东西吗,海淀做网站的公司转自https://www.cnblogs.com/huangxincheng/archive/2012/07/14/2591941.html 这一篇我们聊聊wpf中的画刷#xff0c;在wpf中如果想玩各种花哨#xff0c;那么如何使用画刷则是我们的基本功#xff0c;首先看一下类图 从图中可以看出#xff0c;wpf有5种画刷和1种自定义画…转自https://www.cnblogs.com/huangxincheng/archive/2012/07/14/2591941.html 这一篇我们聊聊wpf中的画刷在wpf中如果想玩各种花哨那么如何使用画刷则是我们的基本功首先看一下类图 从图中可以看出wpf有5种画刷和1种自定义画刷都是继承自基类Brush我们看看基类中有哪些好玩的东西。 这里有3个比较感兴趣的属性分别属于”透明度“和”图像转换“好下面我们一一解说。 一SolidColorBrush实心画刷 实心画刷是我们用的最多的也是最简单的一个其实也就是填充色的意思一个很简单的例子 其实这里的BackgroundRed使用的就是SolidColorBrushxaml进行解析时发现Background是Brush类型刚才我也说了 Brush具有图形转换的能力最后xaml就会通过Transform把”Red字符串解析成SolidColorBrush更直观一点的话我们可以 用C#代码来描述。 1 public partial class MainWindow : Window 2 { 3 public MainWindow() 4 { 5 InitializeComponent(); 6 7 button1.Background new SolidColorBrush(Colors.Red); 8 } 9 } 二GradientBrush(梯度画刷) 如果我们使用过ps或者freehand我们肯定知道在填充色方面有一个叫做“渐变色”的概念我们使用的最多的渐变色要么是“线性”的 要么是“圆形”的刚好这里对应wpf中的“LinearGradientBrush”和“RadialGradientBrush”。 1 LinearGradientBrush线性梯度画刷 线性画刷也是比较简单的一般情况下我们只要设定一个“StartPoint”和“EndPoint”即可。 1 Window x:ClassWpfApplication2.MainWindow2 xmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentation3 xmlns:xhttp://schemas.microsoft.com/winfx/2006/xaml4 TitleMainWindow Height350 Width5255 Canvas6 Rectangle Canvas.Left51 Canvas.Top187 Height101 Namerectangle2 StrokeBlack Width3257 Rectangle.Fill8 LinearGradientBrush StartPoint0,0 EndPoint1,09 GradientStop ColorYellow Offset0.5/ 10 GradientStop ColorGreen Offset1/ 11 /LinearGradientBrush 12 /Rectangle.Fill 13 /Rectangle 14 /Canvas 15 /Window 这里要注意的就是我设定的坐标是(0,0),(0,1)我们知道两点一条直线这条直线与X轴平行我们可以看到颜色的分布是垂直于Y轴的 如果说我们把坐标改为(0,0)(1,1)那么颜色分割线还是与(0,0),(1,1)这条斜线垂直吗最后发现严格垂直。 2RadialgradientBrush(圆形梯度画刷) 在ps中我们玩”圆形渐变“的时候只需要设定圆心坐标和X坐标和Y坐标的值就可以画一个圆形渐变在wpf中同样需要这三个元素 分别对应设Center,RadiusX,RadiusY,当然在wpf中还存在一个“梯度原点“GradientOrigin。 1 Window x:ClassWpfApplication3.MainWindow2 xmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentation3 xmlns:xhttp://schemas.microsoft.com/winfx/2006/xaml4 TitleMainWindow Height350 Width5255 Grid6 Rectangle Height200 HorizontalAlignmentLeft Margin128,45,0,0 Namerectangle1 StrokeBlack VerticalAlignmentTop Width2007 Rectangle.Fill8 RadialGradientBrush GradientOrigin0.5,0.5 Center0.5,0.5 RadiusX0.5 RadiusY0.59 RadialGradientBrush.GradientStops 10 GradientStop ColorYellow Offset0/ 11 GradientStop ColorRed Offset0.25/ 12 GradientStop ColorBlue Offset0.75/ 13 GradientStop ColorLimeGreen Offset1/ 14 /RadialGradientBrush.GradientStops 15 /RadialGradientBrush 16 /Rectangle.Fill 17 /Rectangle 18 /Grid 19 /Window 三ImageBrush图像画刷 这种画刷也是很有意思的有时我们在炫时需要用图片做装饰那么此时ImageBrush就可以祝你一臂之力。 1 Window x:ClassWpfApplication7.MainWindow2 xmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentation3 xmlns:xhttp://schemas.microsoft.com/winfx/2006/xaml4 xmlns:myclr-namespace:WpfApplication75 TitleMainWindow Height350 Width5256 Grid7 Grid.Background8 ImageBrush x:NamelandBrush ImageSourceC:\Users\Administrator\Desktop\weibo\64512.gif/9 /Grid.Background 10 /Grid 11 /Window 四VisualBrush控件画刷 这种画刷是作用在控件级别上的也就是说任何控件都可以作为画刷很神奇的说。 1 Window x:ClassWpfApplication1.MainWindow2 xmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentation3 xmlns:xhttp://schemas.microsoft.com/winfx/2006/xaml4 TitleMainWindow Height350 Width5255 Window.Resources6 VisualBrush x:Keytest TileModeTile Opacity0.87 VisualBrush.Visual8 StackPanel9 TextBlock ForegroundGold 10 唧唧复唧唧 11 /TextBlock 12 TextBlock ForegroundLightBlue 13 木兰开飞机 14 /TextBlock 15 TextBlock ForegroundLightGray 16 开的什么机 17 /TextBlock 18 TextBlock ForegroundPink 19 波音747 20 /TextBlock 21 /StackPanel 22 /VisualBrush.Visual 23 /VisualBrush 24 /Window.Resources 25 Grid 26 Button Content我是超大按钮 Height213 HorizontalAlignmentLeft Margin32,34,0,0 Namebutton1 27 VerticalAlignmentTop Width414 Background{StaticResource ResourceKeytest}/ 28 /Grid 29 /Window 五DrawingBrush自定义画刷 最灵活最复杂的也就是这种自定义画刷毕竟wpf不能给我们满足所有的要求就必须留一道口子给我们程序员自定义实现。 1 Window x:ClassWpfApplication4.MainWindow2 xmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentation3 xmlns:xhttp://schemas.microsoft.com/winfx/2006/xaml4 TitleMainWindow Height350 Width5255 Window.Resources6 DrawingBrush x:Keytest7 DrawingBrush.Drawing8 DrawingGroup9 DrawingGroup.Children 10 GeometryDrawing 11 !-- 绘制矩形 -- 12 GeometryDrawing.Geometry 13 RectangleGeometry RadiusX0.2 RadiusY0.5 14 Rect0.02,0.02,0.96,0.96 / 15 /GeometryDrawing.Geometry 16 !-- 矩形填充色 -- 17 GeometryDrawing.Brush 18 LinearGradientBrush StartPoint0,0 EndPoint0,1 19 GradientStop ColorGreen Offset0 / 20 GradientStop ColorRed Offset1 / 21 /LinearGradientBrush 22 /GeometryDrawing.Brush 23 !-- 矩形边框 -- 24 GeometryDrawing.Pen 25 Pen Thickness0.02 26 Pen.Brush 27 LinearGradientBrush StartPoint0,0 EndPoint0,1 28 GradientStop ColorAliceBlue Offset0 / 29 GradientStop ColorBlack Offset1 / 30 /LinearGradientBrush 31 /Pen.Brush 32 /Pen 33 /GeometryDrawing.Pen 34 /GeometryDrawing 35 /DrawingGroup.Children 36 /DrawingGroup 37 /DrawingBrush.Drawing 38 /DrawingBrush 39 /Window.Resources 40 Grid 41 Button Background{StaticResource ResourceKeytest} FontSize40 ContentButton Height113 HorizontalAlignmentLeft Margin89,80,0,0 Namebutton1 VerticalAlignmentTop Width292 / 42 /Grid 43 /Window
http://www.hkea.cn/news/14316296/

相关文章:

  • 外贸网站一般用什么框架qq推广赚钱一个2元
  • 婚恋网站开发平台代理招商学校网站开发的背景
  • wordpress每页显示文章永州seo快速排名
  • 东莞做网站 动点官网网站建设服务费属于哪个大类
  • 游戏落地页网站建设技术先进的网站建
  • 五大免费资源网站网站建设招标文件范本
  • 网站开发项目进度表科技 杭州 网站建设
  • 唐山做网站那家好wordpress 推荐
  • 网站seo关键词排名推广页面模板在公号什么地方显示
  • 北京私人做网站在wordpress教程
  • 网站设计O2O平台佛山总代理wordpress菜单登录
  • 上海服装品牌网站建设北京做手机网站的公司
  • 做汽车英文网站如何设置公司网站
  • 网站制作培训东莞市人才招聘网
  • 上海网站推一个网站如何推广
  • 网站开发项目报价备案个人可以做视频网站吗
  • 海沧建设网站多少哈尔滨网站建设推广方案
  • 天津快速建站模板丽水建设局网站
  • 网站建设与维护合同范本建设互联网站机房需要哪些设备
  • 最棒的网站建设北京软件公司招聘信息最新
  • 怎么样建设网站访问中国建设银行网站
  • 怎么做网站服务家庭装修设计平台
  • 网站中高端建设上海网站建设公司服务有哪些
  • 模版做网站多少钱wordpress多少钱
  • 网站开发如何dw中小手做网站做推广
  • 手机网站怎么推广礼品网站如何做
  • 网站建设致谢企业经营沙盘seo优化
  • 科技网站设计案例网站建站加盟
  • 商业网站地方频道360网址大全
  • 建设银行网上银行网站网站备案信息是什么意思