Click here to Skip to main content
15,889,851 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi
I have a requirement where i need to use image control and media control in a single page in windows phone 7.

i have a page which has the screenshot of the video that need to play with a play button. when the button is clicked the respective video should play there itself.can anyone suggest me how to place two controls in a single page..

Thanks in advance

Regards
Posted
Comments
Abdullatif M. Abu Al Rub 6-Apr-13 4:48am    
i can't see why you are not able to place them together??
you may add them one each other and use the visibility property to control which one appears as Jeff Blankenburg suggested in his solution..
am i missing something here??

1 solution

Place both controls on the page, but set the Visibility property of the media element to Collapsed. When the user clicks on the image control, set it to collapsed, and the media element to visible. Something like this:

C#
Image.Visibility = Visibility.Collapsed;
MediaElement.Visibility = Visibility.Visible;
MediaElement.Play();
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900