UWP 仅将 ScrollViewer 共享到外部 Monitor/MiraCast
UWP share only ScrollViewer to External Monitor/MiraCast
我只会通过 Miracast 向我的外接显示器显示图像 (Koala)。
企鹅只是作为我自己的预览,就像一个演示应用程序。
有没有可能只有ScrollViewer和inside Image会显示在Miracast上?
这是我的 XAML:
<Page
x:Class="App6.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App6"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" Width="335">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" Margin="-410,0,-195,65">
<ScrollViewer x:Name="myScrollViewer" HorizontalAlignment="Left" Height="485" Margin="350,45,0,0" VerticalAlignment="Top" Width="565">
<Image x:Name="myImage" Height="483" Width="570" Source="Assets/Koala.jpg" Stretch="UniformToFill"/>
</ScrollViewer>
<Image x:Name="nextImage" HorizontalAlignment="Left" Height="160" Margin="55,45,0,0" VerticalAlignment="Top" Width="205" Source="Assets/Penguins.jpg"/>
</Grid>
感谢您的帮助!
Is it possible that only the ScrollViewer and inside Image will shown on the Miracast?
是的。您可以检查 BasicMediaCasting sample. In this sample, It renders video on Miracast. You also could render images on Miracast. You just need to pass the image's CastingSource Class 对象的场景 3 到 RequestStartCastingAsync
方法,如下所示:
await connection.RequestStartCastingAsync(img.GetAsCastingSource());
我只会通过 Miracast 向我的外接显示器显示图像 (Koala)。 企鹅只是作为我自己的预览,就像一个演示应用程序。 有没有可能只有ScrollViewer和inside Image会显示在Miracast上?
这是我的 XAML:
<Page
x:Class="App6.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App6"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" Width="335">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" Margin="-410,0,-195,65">
<ScrollViewer x:Name="myScrollViewer" HorizontalAlignment="Left" Height="485" Margin="350,45,0,0" VerticalAlignment="Top" Width="565">
<Image x:Name="myImage" Height="483" Width="570" Source="Assets/Koala.jpg" Stretch="UniformToFill"/>
</ScrollViewer>
<Image x:Name="nextImage" HorizontalAlignment="Left" Height="160" Margin="55,45,0,0" VerticalAlignment="Top" Width="205" Source="Assets/Penguins.jpg"/>
</Grid>
感谢您的帮助!
Is it possible that only the ScrollViewer and inside Image will shown on the Miracast?
是的。您可以检查 BasicMediaCasting sample. In this sample, It renders video on Miracast. You also could render images on Miracast. You just need to pass the image's CastingSource Class 对象的场景 3 到 RequestStartCastingAsync
方法,如下所示:
await connection.RequestStartCastingAsync(img.GetAsCastingSource());