How to avoid flickering of background color of second window(w2) and directly show running mediaelement embedded in it. This Second window(w2) is called from main window w1?

Vishal2 Bansal 145 Reputation points
2024-03-22T18:25:19.54+00:00
  1. I have a main window w1. I create a window w2 with initial visibility as hidden.
  2. I added a mediaelement inside w2 and added a media source to play.
  3. As soon as media source is opened i want to make w2 visible on w1. w1 is also visible but it is underneath the w2.

Currently i am getting a short millisecond background color of w2 before video in it is started playing. I want directly media source on screen as soon as it is started playing.

Please help me to achieve it.

Thanks & Regards

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,922 questions
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,784 questions
{count} vote

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.