开发者

Adorners overlap controls that are above the adorned element

Hey, I'm having an issue with adorners. I created resize adorners which have four Thumb controls, one for each of the corners of the control being decorated. The control is being drawn on a Canvas, and the user may select it and resize it. The canvas is hosted on a ZoomBoxPanel control, which basically applies 开发者_Go百科a ScaleTransform and TranslateTransform to the whole thing to provide zoom and pan support.

Problem is that when an item is outside the bounds of the zoom panel, and the item is cropped as you'd expect (like when you set ClipToBounds = true), you can still see the adorners! Could anyone please tell me a way to prevent this?

Evidence. The black square is the one selected, two resize thumbs are visible (right), the others should not be visible (left)

Thanks!!


Fixed it, solution was to put an AdornerDecorator object immediately above the Canvas :)

<AdornerDecorator>
   <Canvas>
</AdornerDecorator>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜