WPF学习笔记之10: ImageDrawing vs DrawingImage
2008-04-07 15:56
411 查看
先BS一下MS,文字游戏玩死人了!
接下来看看派生关系图:
<Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:PresentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="PresentationOptions"
Background="White" Margin="20">
<Border BorderBrush="Gray" BorderThickness="1"
HorizontalAlignment="Left" VerticalAlignment="Top"
Margin="10">
<!-- This image uses a Drawing object for its source. -->
<Image>
<Image.Source>
<DrawingImage PresentationOptions:Freeze="True">
<DrawingImage.Drawing>
<GeometryDrawing>
<GeometryDrawing.Geometry>
<GeometryGroup>
<EllipseGeometry Center="50,50" RadiusX="45" RadiusY="20" />
<EllipseGeometry Center="50,50" RadiusX="20" RadiusY="45" />
</GeometryGroup>
</GeometryDrawing.Geometry>
<GeometryDrawing.Brush>
<LinearGradientBrush>
<GradientStop Offset="0.0" Color="Blue" />
<GradientStop Offset="1.0" Color="#CCCCFF" />
</LinearGradientBrush>
</GeometryDrawing.Brush>
<GeometryDrawing.Pen>
<Pen Thickness="10" Brush="Black" />
</GeometryDrawing.Pen>
</GeometryDrawing>
</DrawingImage.Drawing>
</DrawingImage>
</Image.Source>
</Image>
</Border>
</Page>
接下来看看派生关系图:
<Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:PresentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="PresentationOptions"
Background="White" Margin="20">
<Border BorderBrush="Gray" BorderThickness="1"
HorizontalAlignment="Left" VerticalAlignment="Top"
Margin="10">
<!-- This image uses a Drawing object for its source. -->
<Image>
<Image.Source>
<DrawingImage PresentationOptions:Freeze="True">
<DrawingImage.Drawing>
<GeometryDrawing>
<GeometryDrawing.Geometry>
<GeometryGroup>
<EllipseGeometry Center="50,50" RadiusX="45" RadiusY="20" />
<EllipseGeometry Center="50,50" RadiusX="20" RadiusY="45" />
</GeometryGroup>
</GeometryDrawing.Geometry>
<GeometryDrawing.Brush>
<LinearGradientBrush>
<GradientStop Offset="0.0" Color="Blue" />
<GradientStop Offset="1.0" Color="#CCCCFF" />
</LinearGradientBrush>
</GeometryDrawing.Brush>
<GeometryDrawing.Pen>
<Pen Thickness="10" Brush="Black" />
</GeometryDrawing.Pen>
</GeometryDrawing>
</DrawingImage.Drawing>
</DrawingImage>
</Image.Source>
</Image>
</Border>
</Page>
相关文章推荐
- OpenCV学习笔记10 OpenCV图像处理模块ImgProc Module. Image Processing(三)
- halcon例程学习笔记(10)---图像灰度共生矩阵cooc_feature_image.hdev
- ASP: VS2015 + IIS Express 10 学习笔记
- halcon例程学习笔记(10)---图像灰度共生矩阵cooc_feature_image.hdev
- Lua学习笔记1:Windows7下使用VS2015搭建Lua开发环境(一)
- VS2013MFC单文档工程学习笔记七 - 创建新的一个窗口并让窗口2透明
- WPF and Silverlight 学习笔记(二十八):基本图形的使用(3)图形的操作
- python 学习笔记 10 -- 正则表达式
- 2013/08/19 C# WPF 学习笔记
- System Verilog视频学习笔记(10)- Inter-Thread Communication
- 黑马程序员---wpf学习笔记七----数据库中null解说
- WPF学习笔记--基本知识
- Box2d VS Nape 学习笔记
- Swift学习笔记10——属性(Properties)
- 深度学习论文笔记-Deep Learning Face Representation from Predicting 10,000 Classes
- 《笨办法学python3》的学习笔记(10-15)节
- 《剑指Offer》学习笔记--面试题41:和为s的两个数字VS和为s的连续正数序列
- Solaris 10 学习笔记
- Nutch学习笔记10---一个bug引发Http协议研究
- 《剑指Offer》学习笔记--面试题42:翻转单词顺序VS坐旋转字符串