绘制" L"使用的DrawingContext [英] Draw a "L" using the DrawingContext
本文介绍了绘制" L"使用的DrawingContext的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我要→
在WPF中绘制(使用 System.Windows.Media.DrawingContext
)一个。
什么是继续进行的最佳方式?
I need to Draw (using System.Windows.Media.DrawingContext
) a "L
" in WPF.
What is the optimal way to proceed?
2画线?绘制 PolyLineSegment
? (不知道如何)
Draw 2 lines? Draw a PolyLineSegment
? (not sure how)
drawContext.DrawLine(myPen, topLeft, New Point(topLeft.X + 5, topLeft.Y))
drawContext.DrawLine(myPen, topLeft, New Point(topLeft.X, topLeft.Y + 5))
其实,我需要与周围可见的角落L状......
标签
我需要的画的不可以使用模板或装饰。
Actually, I need to surround a label with visible corners "L"-like...
I need to draw, not to use Templates or Decorators.
推荐答案
如果你的问题是关于添加尽可能少绘图
对象的的DrawingContext
,你可能会填充 StreamGeometry 并通过 DrawGeometry <绘制/ A>。
If your question is about adding as few as possible Drawing
objects to your DrawingContext
, you might populate a StreamGeometry and draw it by DrawGeometry.
这篇关于绘制&QUOT; L&QUOT;使用的DrawingContext的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文