c# - Can I specify the border to be on the inside? -
i have defined hexagon using system.windows.shapes.path
, applying stroke
(solidcolorbrush
) border goes outside , inside.
how can make stroke applied on inside of path
?
you need use clip dependency property : idea clip path own geometry this.
<path ... clip="{binding data, relativesource={relativesource self}}"/>
you have double strokethickness, since half of stroke visible.
even if works in silverlight , wpf, had problems in past code (binding clip relative source) ; solved adding binding or assigning clip in code .
edit : note, clipping, pathgeometry should filled.
the clipped area "outside" of geometry. in other words, content shown (not clipped) area of geometry otherwise have fill if geometry used data path rather clipping. clipped area area falls outside geometry overlay. complex geometries, areas clipped or not clipped influenced geometry's fillrule.
Comments
Post a Comment