Adding MediaElement to windows form error C#
<p>Hi i just recently found out that you can use components from WPF and add into windows form just by creating them and later adding then into the form as element Host </p>

<p>So what i am trying to do is to create a video player using MediaElement and i also know that you can use Direct X or use Windows Media player for this put i want to custom make some controls in this so here is my question </p>

<p>when i try to add a the media element into my windows form it give me this error
<a href="https://i.stack.imgur.com/r4cu0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/r4cu0.png" alt="enter image description here"></a></p>

<p>here's my code for the mediaelement wpf</p>

<pre><code>&lt;UserControl x:Class="Videoplayer_2._0.MediaPlayer"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:Videoplayer_2._0"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300"&gt;
    &lt;Grid&gt;
        &lt;MediaElement x:Name="mediaElement" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" /&gt;

    &lt;/Grid&gt;
&lt;/UserControl&gt;
</code></pre>

<p>So is adding mediaElement just doesn't work or i did something wrong and also i added a WPF slider into the form also just saying because i have no idea if it will affect it or not</p>