是否可以实现自定义System.Windows.Media.Geometry? [英] Is it possible to implement custom System.Windows.Media.Geometry ?
问题描述
我想使用ArrowGeometry或类似的东西构建这样的基元:
______
_ | | _
但是我想通过我会设置动画的属性来控制这些原语.这意味着我想继承几何.
有可能实现吗?
或者我只有诸如CombinedGeometry,PathGeometry和StreamGeometry之类的选项?
您可以继承 以下几条链接可以帮助您创建自定义形状,例如Arrow和其他类型的形状
http://damianedwards.wordpress.com/2007/05/24/writing-a-custom-shape-for-wpf-2/
>
I want to build such primitives live ArrowGeometry or something like this:
______
_| |_
But I want to have control over this primitives by properties which I would animate. It means I want to inherit from Geometry.
Is it possible to implement?
Or I only have options like CombinedGeometry, PathGeometry and StreamGeometry?
You can inherit the System.Windows.Media.Geometry class and can create your own geometry according to your requirement.
http://msdn.microsoft.com/en-us/library/system.windows.media.geometry.aspx
Following are few links which can help you create custom shape like Arrow and other types of shapes
http://www.codeproject.com/KB/WPF/wpfarrow.aspx
http://damianedwards.wordpress.com/2007/05/24/writing-a-custom-shape-for-wpf-2/
这篇关于是否可以实现自定义System.Windows.Media.Geometry?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!