Full Screen View For Media Element In WPF

No.of Views1749
Bookmarked1 times
Downloads 
Votes0
By  dpatra   On  28 Apr 2010 11:04:00
Tag : WPF , Docking Controls
In the previous article about “Seek bar For Media Element in WPF”, we saw how to seek the Media Element to the desired position. In this article we will see how we can make the Media Element to run FullScreen.
emailbookmarkadd commentsprint

Images in this article missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at info@codegain.com

 

Introduction

In the previous article about “Seek bar For Media Element in WPF”, we saw how to seek the Media Element to the desired position. In this article we will see how we can make the Media Element to run FullScreen.


Creating WPF Application Project


Fire up Visual Studio 2008 and Create a WPF Application and name the project as MediaSampleWPF.
 

Image Loading


I am just extending the feature that we experienced in our last application titled “Media Element In WPF”, “Screenshot From Media Element in WPF”, and “Seek bar For Media For Media Element In WPF”.
As in the Timer Control’s Tick event we are doing something, let’s add a piece of code that would help us making the Media Element Full Screen run properly.
 

 

Image Loading

We will make the MediaElement to show as FullScreen on MouseDoubleClick, but there is a road block for us. We don’t have LeftMouseDoubleClick event for MediaElement.
So we will tweak this in following manner, we will take up the System’s Double Click Time and use it in our LeftMouseButtonUp event.
 

Image Loading

Above timer will be similar to System’s DoubleClickTime.

 

Image Loading

The above code should work for making the Full Screen view. Let’s test it.
Run the application and Double Click on the Media Element. Now you can see the Media Element running in Full Screen Mode.

 

Image Loading

In Full Screen View:
 

 

Image Loading

 

Conclusion

In this article i have given create full screen view in WPF.Hope this article help.

Sample Project Source

Download source files -57 kb

 
Sign Up to vote for this article
 
About Author
 
dpatra
Occupation-Not Provided
Company-Not Provided
Member Type-Expert
Location-Not Provided
Joined date-13 Jul 2009
Home Page-Not Provided
Blog Page-Not Provided
 
 
Other popularSectionarticles
Comments
There is no comments for this articles.
Leave a Reply
Title:
Display Name:
Email:
(not display in page for the security purphase)
Website:
Message:
Please refresh your screen using Ctrl+F5
If you can't read this number refresh your screen
Please input the anti-spam code that you can read in the image.
^ Scroll to Top