c# - 有没有办法在使用“RequestStartCasting”的 Miracast 设备期间隐藏配对消息框?
问题描述
- 在显示监视器中连接 Miracast 设备
- 使用“CastingDevice.CreateCastingConnection()”创建与 Miracast 设备的连接
- 使用“castDeviceConnection.RequestStartCastingAsync()”使用 Miracast 设备进行投射请求
调用“RequestStartCastingAsync()”后显示设备配对消息框。有没有办法隐藏这些消息框?
示例代码:
//Create a new casting connection to the device that's been selected
castDeviceConnection = SelectedCastingDevice.CreateCastingConnection();
//Register for events
castDeviceConnection.ErrorOccurred += Connection_ErrorOccurred;
castDeviceConnection.StateChanged += Connection_StateChanged;
//casting test image
Image castImage = new Image();
castImage.Source = new Windows.UI.Xaml.Media.Imaging.BitmapImage
(new Uri(@"ms-appx:////Assets/test.jpg"));
CastingConnectionErrorStatus status = CastingConnectionErrorStatus.Unknown;
// Request for casting
castDeviceConnection.RequestStartCastingAsync( castImage.GetAsCastingSource());
解决方案
推荐阅读
- excel - 请解释当我们在 excel 中使用 rank.avg 函数时下面的代码是如何工作的
- swift - 为什么 Firebase Analytics 数据不显示在 BigQuery 中?
- c# - 如何根据输入字段的值统一更改场景
- python - pylint 似乎不适用于数据类中定义的字典
- python - 查询相关模型时避免在 Flask/SQLAlchemy 中循环导入
- c++ - 项目坐标更改时如何更新 QGraphicsScene
- c++ - 在 dev-c++ 中将数组放在一起
- c# - 在 C# / ASP.NET 中异步检查 Internet
- javascript - 如何根据与其他表的多对多关系过滤掉元素?
- r - 如何在 R 中找到回报率。我按月按数据分组