# How do we pass a filestream to MediaElement Control in WPF

**URL:** <https://forum.kirupa.com/t/how-do-we-pass-a-filestream-to-mediaelement-control-in-wpf/313939>\
**Category:** programming\
**Created:** [September 14, 2010, 10:22am UTC](https://forum.kirupa.com/t/how-do-we-pass-a-filestream-to-mediaelement-control-in-wpf/313939 "2010-09-14T10:22:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![meddle58](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@meddle58](https://forum.kirupa.com/u/meddle58)\
**Post date:** [September 14, 2010, 10:22am UTC](https://forum.kirupa.com/t/how-do-we-pass-a-filestream-to-mediaelement-control-in-wpf/313939/1 "2010-09-14T10:22:22Z")

</div>

MediaElement is a control used in Expression Blend for playing Videos and this thread is related to WPF Windows Application rather than Silverlight.

I am working on a project and i am using Media Element control in the same for playing movies. The code that plays the movie in Blend goes like this

MediaElement.Source = URI;  
MediaElement.Play();

But the solution that i want is to play a video FileStream into the MediaElement Control rather than the URI. My Questions are

Is it possible to play a video FileStream into the Media Element Control?  
If yes how do we approach the same?  
How will the code go?
