다음을 통해 공유


InfraredTorchControl.SupportedModes 속성

정의

SupportedModes 속성은 적외선 LED가 지원하는 모드를 찾는 데 사용됩니다.

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)

속성 값

지원되는 적외선TorchModes의 읽기 전용 목록입니다.

예제

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");
    }
}

적용 대상

추가 정보