WPF使用Expression Design设计图形
1.将画好的图形通过菜单导出成WPF xaml格式。
2.导出的文件就可以直接在WPF程序中使用了。
这里导出的DrawingBrush,
<?xml version="1.0" encoding="utf-8"?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<DrawingBrush x:Key="Layer_1" Stretch="Uniform">
<DrawingBrush.Drawing>
<DrawingGroup>
<DrawingGroup.Children>
<GeometryDrawing Brush="#FFFFFFFF" Geometry="F1 M 457.573,312.171L 453.463,299.376L 462.222,289.183L 452.266,280.156L 454.755,266.949L 441.619,264.11L 437.171,251.428L 424.375,255.537L 414.183,246.778L 405.156,256.735L 391.949,254.245L 389.11,267.381L 376.428,271.829L 380.537,284.625L 371.778,294.817L 381.735,303.844L 379.245,317.051L 392.381,319.89L 396.829,332.573L 409.625,328.463L 419.817,337.222L 428.844,327.266L 442.051,329.755L 444.89,316.619L 457.573,312.171 Z ">
<GeometryDrawing.Pen>
<Pen Thickness="2" LineJoin="Round" Brush="#FFFFFFFF"/>
</GeometryDrawing.Pen>
</GeometryDrawing>
<GeometryDrawing Brush="#FFFFFFFF" Geometry="F1 M 386.038,290.135C 387.224,272.155 402.232,258.507 419.559,259.651C 436.886,260.794 449.97,276.296 448.784,294.276C 447.597,312.255 432.589,325.904 415.262,324.76C 397.935,323.617 384.851,308.115 386.038,290.135 Z "/>
<GeometryDrawing Brush="#FF1D82DA" Geometry="F1 M 385.031,290.236L 385.038,290.069L 385.038,290.069C 385.812,281.515 389.847,272.616 396.087,266.941C 402.327,261.267 411.357,258.285 419.628,258.613L 419.628,258.613C 427.87,259.374 436.429,263.517 441.869,269.963C 447.31,276.408 450.14,285.761 449.784,294.342L 449.784,294.342C 449.01,302.896 444.974,311.795 438.734,317.47C 432.494,323.144 423.464,326.126 415.194,325.798L 415.194,325.798C 406.952,325.036 398.392,320.894 392.952,314.448C 387.512,308.003 384.681,298.65 385.038,290.069L 385.041,290.034L 387.006,290.166L 387.003,290.199L 387.003,290.199C 386.668,298.259 389.327,307.044 394.437,313.098C 399.547,319.152 407.587,323.043 415.328,323.758L 415.328,323.758C 423.097,324.066 431.578,321.266 437.439,315.936C 443.301,310.606 447.091,302.246 447.818,294.212L 447.818,294.212C 448.153,286.152 445.494,277.367 440.384,271.313C 435.274,265.259 427.235,261.368 419.493,260.653L 419.493,260.653C 411.724,260.344 403.243,263.145 397.382,268.475C 391.521,273.805 387.73,282.164 387.003,290.199L 386.997,290.356L 385.031,290.236 Z "/>
</DrawingGroup.Children>
</DrawingGroup>
</DrawingBrush.Drawing>
</DrawingBrush>
</ResourceDictionary>
复制DrawingBrush节点,到所要填补的形状节点中,通过形状节点.Fill属性进行使用。
<Ellipse Width="80" Height="80" HorizontalAlignment="Right" VerticalAlignment="Bottom">
<Ellipse.Fill>
<DrawingBrush Stretch="Uniform">
<DrawingBrush.Drawing>
<DrawingGroup>
<DrawingGroup.Children>
<GeometryDrawing Brush="#FFFFFFFF" Geometry="F1 M 457.573,312.171L 453.463,299.376L 462.222,289.183L 452.266,280.156L 454.755,266.949L 441.619,264.11L 437.171,251.428L 424.375,255.537L 414.183,246.778L 405.156,256.735L 391.949,254.245L 389.11,267.381L 376.428,271.829L 380.537,284.625L 371.778,294.817L 381.735,303.844L 379.245,317.051L 392.381,319.89L 396.829,332.573L 409.625,328.463L 419.817,337.222L 428.844,327.266L 442.051,329.755L 444.89,316.619L 457.573,312.171 Z ">
<GeometryDrawing.Pen>
<Pen Thickness="2" LineJoin="Round" Brush="#FFFFFFFF"/>
</GeometryDrawing.Pen>
</GeometryDrawing>
<GeometryDrawing Brush="#FFFFFFFF" Geometry="F1 M 386.038,290.135C 387.224,272.155 402.232,258.507 419.559,259.651C 436.886,260.794 449.97,276.296 448.784,294.276C 447.597,312.255 432.589,325.904 415.262,324.76C 397.935,323.617 384.851,308.115 386.038,290.135 Z "/>
<GeometryDrawing Brush="#FF1D82DA" Geometry="F1 M 385.031,290.236L 385.038,290.069L 385.038,290.069C 385.812,281.515 389.847,272.616 396.087,266.941C 402.327,261.267 411.357,258.285 419.628,258.613L 419.628,258.613C 427.87,259.374 436.429,263.517 441.869,269.963C 447.31,276.408 450.14,285.761 449.784,294.342L 449.784,294.342C 449.01,302.896 444.974,311.795 438.734,317.47C 432.494,323.144 423.464,326.126 415.194,325.798L 415.194,325.798C 406.952,325.036 398.392,320.894 392.952,314.448C 387.512,308.003 384.681,298.65 385.038,290.069L 385.041,290.034L 387.006,290.166L 387.003,290.199L 387.003,290.199C 386.668,298.259 389.327,307.044 394.437,313.098C 399.547,319.152 407.587,323.043 415.328,323.758L 415.328,323.758C 423.097,324.066 431.578,321.266 437.439,315.936C 443.301,310.606 447.091,302.246 447.818,294.212L 447.818,294.212C 448.153,286.152 445.494,277.367 440.384,271.313C 435.274,265.259 427.235,261.368 419.493,260.653L 419.493,260.653C 411.724,260.344 403.243,263.145 397.382,268.475C 391.521,273.805 387.73,282.164 387.003,290.199L 386.997,290.356L 385.031,290.236 Z "/>
</DrawingGroup.Children>
</DrawingGroup>
</DrawingBrush.Drawing>
</DrawingBrush>
</Ellipse.Fill>
</Ellipse>
WPF使用Expression Design设计图形的更多相关文章
- 零元学Expression Design 4 - Chapter 3 看小光被包围了!!如何活用「Text On Path」设计效果
原文:零元学Expression Design 4 - Chapter 3 看小光被包围了!!如何活用「Text On Path」设计效果 本章将教大家如何活用「Text On Path」,做出文绕图 ...
- eclipse里打开SWT项目找不到source/design的图形UI设计界面
因为前天重新装了个新版的eclipse, 结果今天打开一个SWT的项目,突然找不到source/design的图形UI设计的两个切换按钮 我把SWT组件重新装了还是找不到.结果后来发现是因为重装ecl ...
- WPF学习笔记-用Expression Design制作矢量图然后导出为XAML
WPF学习笔记-用Expression Design制作矢量图然后导出为XAML 第一次用Windows live writer写东西,感觉不错,哈哈~~ 1.在白纸上完全凭感觉,想象来画图难度很大, ...
- 零元学Expression Design 4 - Chapter 2 熟悉Design并且快速设计出Silverlight网页
原文:零元学Expression Design 4 - Chapter 2 熟悉Design并且快速设计出Silverlight网页 本章将用带大家熟悉Design 4并制作简易的网页版面,也会让你了 ...
- 如何获取Expression Design 4工具与Expression Blend 4工具
在VS2010+C#+WPF 开发项目过程中涉及到界面的布局与设计,网上有人讲采用Expression Design 4与Expression Blend 4工具相当方便, 于是决定试看看,下面将这个 ...
- 零元学Expression Design 4 - Chapter 7 使用内建功能「Clone」来达成Path的影分身之术
原文:零元学Expression Design 4 - Chapter 7 使用内建功能「Clone」来达成Path的影分身之术 本章所介绍的是便利且快速的内建工具Clone ? 本章所介绍的是便利且 ...
- 零元学Expression Design 4 - Chapter 5 教你如何用自制笔刷在5分钟内做出设计感效果
原文:零元学Expression Design 4 - Chapter 5 教你如何用自制笔刷在5分钟内做出设计感效果 本章将教你如何运用笔刷与简单线条,只要5分钟,就能做出设计感效果 ? 本章将教你 ...
- 零元学Expression Design 4 - Chapter 4 教你如何自制超炫笔刷
原文:零元学Expression Design 4 - Chapter 4 教你如何自制超炫笔刷 在Chapter 2 有稍微讲过Design内建笔刷的用法,本章将教大家如何自制独一无二的笔刷,并且重 ...
- WPF和Expression Blend开发实例:模拟QQ登陆界面打开和关闭特效
不管在消费者的心中腾讯是一个怎么样的模仿者抄袭者的形象,但是腾讯在软件交互上的设计一直是一流的.正如某位已故的知名产品经理所说的:设计并非外观怎样,感觉如何.设计的是产品的工作原理.我觉得腾讯掌握了其 ...
随机推荐
- 上下居中css
.css{ position: relative, top: 50%, transform: translateY(-50%) }
- 1小时轻松上手springmvc,视频网站后台开发
由于最近半年一直在用springboot,但是也不能忘了本,于是把springmvc重新练了下,做了个前端传个表单,后台接收并显示的界面,该项目可以上传视频的URL,然后前端进行页面的播放,项目采用s ...
- Entity Framework基础
http://blog.csdn.net/hurtlingsnail/article/details/53113934
- python3----练习题(装饰器)
装饰器本质上是一个函数,该函数用来处理其他函数,它可以让其他函数在不需要修改代码的前提下增加额外的功能,装饰器的返回值也是一个函数对象.也就是说装饰器的作用就是为已经存在的对象添加额外的功能. 当使用 ...
- Django之前端模板继承
在使用Django进行web开发时,往往会构造一个基础框架模板即base.html,而后在其子模板中对它所包含站点公用部分和定义块进行重载. 首先创建一个base.html,源码为: <!DOC ...
- django用户认证系统——自定义认证后台8
Django auth 应用默认支持用户名(username)进行登录.但是在实践中,网站可能还需要邮箱.手机号.身份证号等进行登录,这就需要我们自己写一个认证后台,用于验证用户输入的用户信息是否正确 ...
- hdu 4050(概率dp)
算是挺简单的一道概率dp了,如果做了前面的聪聪于可可的话,这题不需要什么预处理,直接概率dp就行了... #include <stdio.h> #include <stdlib.h& ...
- Spring Cloud Zuul实现IP访问控制
接着上篇文章 https://www.cnblogs.com/mxmbk/p/9569438.html IP访问限制和黑白名单如何做,需要解决以下几个问题: 1.如何识别正常访问和异常访问?(一段时间 ...
- 开源平台ghost博客系统
http://docs.ghost.org/installation/windows/ 不会安装的童鞋可以到这里论坛看看 此教程只说windows下的安装: mac的安装教程请移步这里 mac版安装 ...
- 微软MVP Round Table
2017年7月7日,微软VS圈子的老大兼女神Julia(潘正磊)以及Peter Hu等人,和若干MVP一起在进行了一次Round Table讨论. 讨论过程中主要针对VS和TFS/VSTS相关的功能. ...