Trigger inside anoter trigger not work?

That’s work:

<Each Items="{Items}">
    <Panel>
        <Clicked>
             <NavigateTo Target="{resource}"/>
        </Clicked>
        <WhileActive>
            <DebugAction Message="Current Page is active"/>
        </WhileActive>
    </Panel>
</Each>

That doesn’t:

<Each Items="{Items}">
    <Panel>
        <Clicked>
             <NavigateTo Target="{resource}"/>
             <WhileActive>
                  <DebugAction Message="Current Page is active"/>
             </WhileActive>
        </Clicked>
    </Panel>
</Each>

A couple of things to try:

  • Does it work if you remove the NavigateTo? It could be that you navigate away from the page before the WhileActive check is performed.

  • You may want to add Bypass="Never" to the WhileActive trigger to ensure that it also fires on the very first page you’re on (e.g. without having to navigate to that page first). Of course, this would also be the case for your original (working) example.

Remi Pedersen thanks! Bypass=“Never” solve my problem

But… If I place something different than DebugAction it doesn’t trigger =(

For example:

    <Clicked>
             <NavigateTo Target="{resource}"/>
             <WhileActive Bypass="Never">
                    <!-- Not Triggered -->
                    <Change popup.Visibility="Visible"/>
                    <Change mask.Scale="1" Duration="0.45" Easing="CircularOut" EasingBack="QuinticIn"/>
                     <!-- Triggered -->
                    <DebugAction Message="Current Page is active"/>
             </WhileActive>
    </Clicked>

PS Removing <NavigateTo> doesn’t solve problem as well

Can you explain what you’re trying to achieve in this case?
I’m starting to suspect double-triggers isn’t the right solution. :slight_smile:

I have LinearNavigator with cards created in scrollview manner with always displaying 3 cards in screen. When user touch to one of item (that not active in current time) it became active (navigateTo) like in this example:
https://www.fusetools.com/examples/navigation-animation

But if user touched already active card I want show some lightbox or popup over it.

Hmm, it seems like the issue might be specifically with the combination of Clicked, WhileActive and Change. Other combinations of triggers and animators work in my tests.
Also, if you switch WhileActive and Clicked around you may be getting better results.

Unfortunately I can’t switch WhileActive and Clicked around. It’s not work for me.

This should give the same behavior as you aimed for with your previous snippet:

<Clicked>
    <NavigateTo Target="{resource}"/>
</Clicked>
<WhileActive Bypass="Never">
    <Clicked>
        <Change popup.Visibility="Visible"/>
        <Change mask.Scale="1" Duration="0.45" Easing="CircularOut" EasingBack="QuinticIn"/>
        <DebugAction Message="Current Page is active"/>
    </Clicked>
</WhileActive>

(Note that I’ve just used the same code you had there. I suspect you want to deal with the visibility with either a Set or a duration of some kind, otherwise it’ll just be visible for a single frame)

Excellent! That’s what I need=)

Final version:

<WhileActive>
  <Clicked>
    <Change popup.Visibility="Visible"/>
    <Change mask.Scale="1" Duration="0.45" Easing="CircularOut" EasingBack="QuinticIn"/>
  </Clicked>
</WhileActive>
<WhileInactive>
  <Clicked>
    <NavigateTo Target="{resource}"/>
  </Clicked>
</WhileInactive>