BenBtg
BenBtg

Reputation: 836

Windows Phone Setting Visibity of an Element based on ImageOpened event

I'm trying to find a way to set the visibility of a Visual element based on the completion of an loading and display state of Image Element.

Is there a property I can bind to on an Image that will indicate display state?

Note: The app is using MVVM so I would like to avoid code behind if at all possible.

Upvotes: 0

Views: 152

Answers (2)

Murven
Murven

Reputation: 2387

You could avoid the code behind by creating a behavior that hooks into the events and sets the visibility. Then you can attach this behavior to your images using xaml.

Upvotes: 2

calum
calum

Reputation: 1580

You will need to use the ImageOpened and ImageFailed events and then set the visibility in code behind. There is no member of the Image control that will give you the state of the image.

Upvotes: 1

Related Questions