Click here to Skip to main content
15,883,705 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hello,
i´m developing a dual monitor application in WPF in which each screen has assigned its own wpf-window.
On each WPF-Window i have a Viewport3D and a GeometryModel3D.
As Texture for the 3D-Model i am using a Video with mediaelement as its container.

Example Code:
XML
<GeometryModel3D  x:Name="MyGeometry" Geometry="{StaticResource MyResource}" >
  <GeometryModel3D.Material>
    <MaterialGroup>
      <DiffuseMaterial >
        <DiffuseMaterial.Brush>
           <VisualBrush>
              <VisualBrush.Visual>
                <MediaElement Name="MyMediaElement"  LoadedBehavior="Manual" MediaEnded="MyMediaElement_MediaEnded" UnloadedBehavior="Stop" Source="MyVideo.wmv" />


The video file is playing in a loop and as i wrote before each Screen is showing its own video. So I have 2 Videos playing on different Monitors.

This works in principle, but i am facing the problem, that on my secondary screen the video will eventually not be rendered in each loop.
Which means for several loops the videotexture is rendered and then for one loop no video is rendered. On the next loop it´s working again.
And it´s always the secondary screen on which the video will not be rendered. On my PrimaryScreen everything works fine.

I have read that the .net framework has sometimes problems with videos on a secondary screen, but because its working on the primary screen i don´t think my solution is fundamentally wrong.

I am using VisualStudio 2010 with .Net Clientframework 4.0

Thanks for any help!
Posted

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