首页 > 解决方案 > Main window in WPF application is not showing in screen share in skype or teams

问题描述

When I join a meeting on skype or teams I need to share the content of the application main window (without any other thing on the screen), but it's not showing in the window share menu, I can only stream it with the whole desktop.

see image here

But, when I open Login window it appears in the window share menu while the main window still do not appear ! As in the image below.

Login window appears in the menu

Does anyone have any idea what would prevent the window from appearing in the window share menu ?

标签: c#wpfscreenshare

解决方案


I had the same problem and I figured out that the window needs a Title so it is selectable in Teams for sharing. Once I added the Title to my main window everything works.

It can be done in the code:

   mainWindow.Title = "test";

or in XAML:

<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        Height="900" Width="1200" MinWidth="900"
        x:Name="mainWindow"
        Title="{x:Static p:Resource.MainView_Header}">
...
</Window>

推荐阅读