Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

WPF graph children z-order

Solved!
Go to solution

I have a canvas added to a WPF graph's children in XAML to drawing various text blocks and lines. Later in code I add RangeCursors. The RangeCursors paint on top of the canvas, but I'd like the canvas on top. Is there a way to control this? I've tried both adding the RangeCursors at the end of the children collection and inserting at position 0, but the result is the same (RangeCursors on top).

0 Kudos
Message 1 of 2
(5,022 Views)
Solution
Accepted by topic author ShawnHoover

Set the ZIndex of the canvas to a value above the default of zero:


    <ni:Graph.Children>
        <Canvas Panel.ZIndex="1" ... />
        <ni:RangeCursor ... />
    </ni:Graph.Children>

~ Paul H
Message 2 of 2
(4,992 Views)