Windows 10手机应用程序打开闪光灯(灯)

问题描述:

我遇到问题。我是一个新的Windows Phone 10开发人员,我有一个问题。Windows 10手机应用程序打开闪光灯(灯)

如何打开Lumia 930上的手电筒?我无法在互联网上找到任何答案。

THX很多, 问候

的Windows.Devices.Lights.Lamp命名空间,你需要看,有灯的使用在Windows 10 https://github.com/Microsoft/Windows-universal-samples/tree/master/lamp一个例子,可能会有帮助。 下面是一个基于此作为链接替代的小例子:

using (var lamp = await Lamp.GetDefaultAsync()) 
{ 
    lamp.BrightnessLevel = 1.0F; 
    lamp.IsEnabled = true; 
}