Need help ASAP

What I want here is when the user clicked on the button one image will appear … when he clicked on the image that appeared I want it to be hiding I used what Kristian Hasselknippe gave me and it workes but my problem when I pressed the button again there is no image appeared in the second time …

Kristian Hasselknippe wrote:

Here is one way to do it:

<WhileFalse ux:Name="hideImage">
    <Panel>
        <Image File.....>
        <Clicked>
            <Toggle Targetr="hideImage" />
        </Clicked>
    </Panel>
</WhileFalse>

This is using a WhileFalse trigger to conditionally show the image (which it will by default). Then in a clicked trigger we toggle its value, which will result in the image being unrooted.

I think I have to use “Callback” but I’m not sure how can I use it?

Hi,

Everything inside the WhileFalse will be removed when the trigger is false. This includes your <Clicked> handler with the <Toggle>, so it’s natural clicking it again won’t do anything.

You need to put your Clicked and Toggle somewhere outside the WhileFalse