[英]Draw a “L” using the DrawingContext
我需要在WPF中使用System.Windows.Media.DrawingContext
繪制一個“ L
”。 最佳的進行方式是什么?
畫兩條線? 繪制PolyLineSegment
? (不確定如何)
drawContext.DrawLine(myPen, topLeft, New Point(topLeft.X + 5, topLeft.Y))
drawContext.DrawLine(myPen, topLeft, New Point(topLeft.X, topLeft.Y + 5))
實際上,我需要在標簽周圍加上可見的“ L”形轉角...
我需要繪制 , 而不要使用模板或裝飾器。
如果您的問題是向自己的DrawingContext
添加盡可能少的Drawing
對象,則可以填充StreamGeometry並通過DrawGeometry對其進行繪制 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.