Click here to Skip to main content
15,886,067 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using MediaElement in my program.

XML
<MediaElement x:Name="media" Source="MyVideo.mp4" Height="480" Width="640" HorizontalAlignment="Left" VerticalAlignment="Top" LoadedBehavior="Manual" Stretch="Fill" />


In various articles I see the possibility of using the PosterSource property in this element.

XML
<MediaElement PosterSource="imageUri" />


This property is missing in my media. Where could there be a mistake?

P.S. I use Visual Studio Enterprise 2015. The version of .NET Framework is 4.7.2.

What I have tried:

I'm looking for a missing item.
Posted
Updated 3-Jun-20 23:08pm
Comments
CHill60 4-Jun-20 4:28am    
What version and build of Windows are you using?
Member 12618031 4-Jun-20 4:42am    
Windows 10 Home. Version 1903. OS build 18362.836
CHill60 4-Jun-20 10:48am    
Sorry - didn't see this as you didn't use the "Reply" link
Member 12618031 4-Jun-20 11:10am    
We have already found the answer. This function is available only in UWP applications.

1 solution

According to MediaElement.PosterSource Property (Windows.UI.Xaml.Controls) - Windows UWP applications | Microsoft Docs[^] it is present in that version of Windows 10.

[edit]
That refers to UWP only. Microsoft docs could be a bit easier to navigate sometimes.
[/edit]
 
Share this answer
 
v2
Comments
Member 12618031 4-Jun-20 5:25am    
The list "Applies to WinRT" contains Build 18362. I have OS build 18362.836. Could this be a problem?
Richard MacCutchan 4-Jun-20 5:42am    
My apologies, I was looking in the list at left. It appears that this feature is not available in the non UWP versions.
Member 12618031 4-Jun-20 7:07am    
OK. I'm understood, thank you!

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