InfraredTorchControl.SupportedModes Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
SupportedModes property is used to find out modes that the infrared LED supports.
public:
property IVectorView<InfraredTorchMode> ^ SupportedModes { IVectorView<InfraredTorchMode> ^ get(); };
IVectorView<InfraredTorchMode> SupportedModes();
public IReadOnlyList<InfraredTorchMode> SupportedModes { get; }
var iVectorView = infraredTorchControl.supportedModes;
Public ReadOnly Property SupportedModes As IReadOnlyList(Of InfraredTorchMode)
Property Value
Read-only list of supported InfraredTorchModes.
Examples
using Windows.Media.Capture;
MediaCapture mediaCapture = new MediaCapture();
public MainPage()
{
this.InitializeComponent();
}
protected override async void OnNavigatedTo(NavigationEventArgs e)
{
await mediaCapture.InitializeAsync();
// Preview is Windows.UI.Xaml.Controls.CaptureElement defined in XAML file
// and used to render camera preview
Preview.Source = mediaCapture;
await mediaCapture.StartPreviewAsync();
if (mediaCapture.VideoDeviceController.InfraredTorchControl.IsSupported)
{
Debug.WriteLine("IR torch supported");
IEnumerable<InfraredTorchMode> supportedModes =
mediaCapture.VideoDeviceController.InfraredTorchControl.SupportedModes;
foreach (InfraredTorchMode supportedMode in supportedModes)
{
Debug.WriteLine($"This infrared LED supports mode {supportedMode}");
}
}
else
{
Debug.WriteLine("IR torch NOT supported");
}
}