HitTestMode to hit just the top panel

Hi,

how should i set the HitTestMode in this example so when clicking the inner panel the big one is NOT triggered ?

    <Panel Background="#f0f">
        <Clicked Handler="{onBigClicked}"/>
        <Panel Width="50%" Height="50%" Background="#ff0" >
            <Clicked Handler="{onSmallClicked}"/>
        </Panel>
    </Panel>

You can’t do it directly since pointer events always bubble up to the parents. Instead just create a separate panel that is behind the other one.

    <Panel Background="#f0f">
        <Panel Width="50%" Height="50%" Background="#ff0" >
            <Clicked Handler="{onSmallClicked}"/>
        </Panel>
        <Panel HitTestMode="LocalBounds">
            <Clicked Handler="{onBigClicked}"/>
        </Panel>
    </Panel>

Thnx!!!