Problem when target a WhileTrue statement

Hello!
I’ve problem when target a WhileTrue statement, where I change a panel from Visibility=“Hidden” to Visibility=“Visible”.

First of all i target a WhileTrue statement where I change the panel ExhibitorDetails from Visibility=“Hidden” to Visibility=“Visible”. That works as it should be.

What I want: In the panel ExhibitorDetails I’ve an image that target a WhileTrue statement where I want to change the Visibility, so the ExhibitorDetails doesn’t show anymore.

<Page>
    <Panel ux:Name="ExibitorList" Visibility="Visible">
        <TextField Value="{name}">
            <Clicked>
                <Toggle Target="showDetails" />
            </Clicked>
        </TextField>

        <WhileTrue ux:Name="showDetails">
             <Change ExhibitorDetails.Visibility="Visible" />
             <Change ExibitorList.Visibility="Hidden" />
         </WhileTrue>
    </Panel>

    <Panel ux:Name="ExhibitorDetails" Visibility="Hidden">
        <Image Alignment="TopRight" Width="25" Height="25" Margin="20" File="../../assets/CrossIcon.png">
            <Clicked>
                <Toggle Target="hideExhibitorDetails" />
            </Clicked>
        </Image>
        <WhileTrue ux:Name="hideExhibitorDetails">
             <Change ExhibitorDetails.Visibility="Hidden" />
             <Change ExibitorList.Visibility="Visible" />
         </WhileTrue>
    </Panel>
</Page>

I had a bit of trouble deciphering what it is that you want to achieve, but in the end it appears like a bit of over-engineering.

It would be great if you could provide a complete, minimal reproduction that one could copy-paste and run. The snippet you provided is not that, and does not really help to illustrate or understand the challenge.

That said, it seems to me you don’t need to use a WhileTrue in this case at all. Consider this:

<App>
    <Panel ux:Name="ExibitorList" Visibility="Visible" Color="#18f">
        <Clicked>
             <Set ExhibitorDetails.Visibility="Visible" />
             <Set ExibitorList.Visibility="Hidden" />
        </Clicked>
    </Panel>
    <Panel ux:Name="ExhibitorDetails" Visibility="Hidden" Color="#f81">
        <Clicked>
             <Set ExhibitorDetails.Visibility="Hidden" />
             <Set ExibitorList.Visibility="Visible" />
        </Clicked>
    </Panel>
</App>