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.