我已经实现了 Blend 的标注控制。我面临的问题是标注的锚点从顶部的一些边距开始,而我想从标注的左上角有锚点。任何帮助将不胜感激。
我现在拥有的:
我想拥有的:
您似乎误认为使用此控件。从 MSDN 中,该Callout.AnchorPoint
属性 获取或设置标注相对于左上角的位置。它用于定位控件,不会改变Callout
.
更新>>>
哥们!!!那是一个非常简单的形状......只需用...绘制自己的形状Path
......然后你可以让它成为你想要的任何形状:
<Path Stroke="Black" StrokeThickness="1" Fill="#CCCCFF">
<Path.Data>
<CombinedGeometry GeometryCombineMode="Union">
<CombinedGeometry.Geometry1>
<RectangleGeometry RadiusX="20" RadiusY="20" Rect="0,0,300,200">
<RectangleGeometry.Transform>
<TranslateTransform X="30" />
</RectangleGeometry.Transform>
</RectangleGeometry>
</CombinedGeometry.Geometry1>
<CombinedGeometry.Geometry2>
<PathGeometry>
<PathFigure StartPoint="0,30">
<LineSegment Point="50,10" />
<LineSegment Point="50,50" />
</PathFigure>
</PathGeometry>
</CombinedGeometry.Geometry2>
</CombinedGeometry>
</Path.Data>
<Path.Effect>
<DropShadowEffect Color="Black" Opacity="0.4" Direction="-135"
ShadowDepth="10" />
</Path.Effect>
</Path>