.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> WPF >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Show Video Preview in Control ToolTip in WPF

Posted By:Kirtan       Posted Date: May 16, 2010    Points: 25    Category: WPF    URL: http://www.dotnetspark.com  

Article teach about how to show video preview inside the controls tool tip
 

Introduction:

In this article I will show you how you can show movie clip when popping up tool tip.You can use this when create Explorer kind of UI and want to preview movies inside it or media player which shows movie preview when mouse hover is there.

Technology:

 .net framework 4.0 WPF

Implementation:

First of all let me show you what we are trying to build as sample.



Let's start with creating a new C# WPF Application By going to
 
File >>New project>>Visual C# >>Windows>>WPF Application

we want to display tool tip of the button control when user mouse hover the button the movie preview should be displayed as shown in the picture WPF allow us to nesting the controls that is advantage.Drag drop 1 button control from the tool box set its properties like below

 
now we want to show tool tip for that we need to Set button's ToolTip property like below by mentioning the tag inside the Button Tag so our modified button code will look like below .








Now take one stack panel and inside it we have defined one border element that will provide border to our Media Element in which we are going to show the preview video. So modified final code of the button will look like


Here we have used two element Border and the Media element media element is used to show movie so we have to set its properties like source defines what movie it will show volume defines sound volume ..we have defined MediaElement inside the border element so that border will be shown outside of the media element as shown in screen shot ..

We have achieved the leaf like of shape by setting border Corner radius property :)

That's it what the project and it does what I have told.

Note:

In sample project attached I have not provided the movie because of very huge size of movie. Use any movie path in source property of the mediaelement from your computer to run the project correctly.
Thank you.

 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend