【问题标题】:Change the default camera app in Windows 10 desktop更改 Windows 10 桌面版中的默认相机应用
【发布时间】:2017-02-08 14:07:07
【问题描述】:

如何更改 Windows 10 桌面的默认相机应用程序?该选项可从电话设置中获得,但不能从桌面获得

【问题讨论】:

    标签: camera uwp


    【解决方案1】:

    如果您想进行“高级”照片拍摄,则可以使用MediaCapture 类。关于这一切你会发现at MSDN。还有相当不错的样例at GitHub

    似乎my old post for WinRT 仍然相当相关。你会发现我正在使用 GetCameraID

    private static async Task<DeviceInformation> GetCameraID(Windows.Devices.Enumeration.Panel desired)
    {
        DeviceInformation deviceID = (await DeviceInformation.FindAllAsync(DeviceClass.VideoCapture))
            .FirstOrDefault(x => x.EnclosureLocation != null && x.EnclosureLocation.Panel == desired);
    
        if (deviceID != null) return deviceID;
        else throw new Exception(string.Format("Camera of type {0} doesn't exist.", desired));
    }
    

    选择用于拍摄照片的设备。在您的应用中,您可以枚举设备并选择适合您的设备。

    【讨论】:

      猜你喜欢
      • 2016-09-14
      • 1970-01-01
      • 2017-09-27
      • 2016-05-15
      • 2022-11-22
      • 1970-01-01
      • 2021-10-22
      • 2017-04-24
      • 2015-12-17
      相关资源
      最近更新 更多