开发者

Z-Index of DrawingVisual on VisualHost

UPD: Solved. Look my comment

I have a VisualHost control with overriden

VisualChildrenCount and GetVisualChild(int index).

Also it has a collection of Visuals

p开发者_开发知识库ublic List<Visual> Children { get; set; }

When i reorder items in the collection, their z-index for HitTest changes, but it displays still in wrong order.

Question: Should display order change or not ? If not then how can i change the display order of elements ?

On the image you can see that Rectangle is drawn nearly first, but oval and arc appear behind it.

Z-Index of DrawingVisual on VisualHost

Thanks.

P.S. Of Course, after reordering i call InvalidateVisual()


Looks like the problem was in List<Visual>. After converting to VisualCollection and removing AddVisualChild() and AddLogicalChild() calls problem was solved.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜