RadialControllerIndependentInputSource 클래스

정의

앱이 백그라운드 스레드에서 방사형 컨트롤러 입력을 처리할 수 있도록 합니다.

public ref class RadialControllerIndependentInputSource sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class RadialControllerIndependentInputSource final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class RadialControllerIndependentInputSource
Public NotInheritable Class RadialControllerIndependentInputSource
상속
Object IInspectable RadialControllerIndependentInputSource
특성

Windows 요구 사항

디바이스 패밀리
Windows 10 Creators Update (10.0.15063.0에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v4.0에서 도입되었습니다.)

예제

여기서는 전용 백그라운드 스레드에서 만든 DispatcherQueue 다음, 백그라운드 스레드에 만들어지는 RadialControllerInpdependentInputSource 개체를 초기화합니다.

public void CreateCoreIndependentInputSourceSample() 
{ 
    // Create a new thread, initialize DispatcherQueueController, 
    // and run a DispatcherQueue event loop on it. 
    _queueController =  
        DispatcherQueueController.CreateOnDedicatedThread(); 
    _queue = _queueController.DispatcherQueue;  

    // This is the first TryEnqueue() after creating the DispatcherQueue 
    // callback is guaranteed to be invoked first despite priority on the 
    // newly created thread. 
    bool isQueued = _queue.TryEnqueue( () => 
        {
            // The RadialControllerIndependentInputSource will raise events 
            // on the thread that created it.  
            radialInput = 
                RadialControllerIndependentInputSource.CreateForView(view); 
            radialInput.Controller.ButtonClicked += OnButtonClicked; 
            radialInput.Controller.ButtonHeld += OnButtonHeld; 
            radialInput.Controller.ButtonPressed += OnButtonPressed;  

            // Add RadialControllerMenuItems for this controller. 
            AddMenuItems(radialInput.Controller) 
        });         

    if (!isQueued) 
    { 
        // throw exception as this callback is enqueued. 
    } 

    // Enqueuing future tasks to this thread can be done using the DispatcherQueue 
    // property in RadialControllerIndependentInputSource.
    bool isTaskQueued = radialInput.DispatcherQueue.TryEnqueue( () => 
        { 
            // TODO. 
        }); 
}  

private DispatcherQueueController _queueController; 
private DispatcherQueue _queue; 
private RadialControllerIndependentInputSource radialInput; 

설명

RadialControllerIndependentInputSource가 인스턴스화되는 백그라운드 스레드에서 만들기 DispatcherQueue 위한 호출 DispatcherQueueController.CreateOnDedicatedThread 입니다. 속성을 사용하여 액세스 DispatcherQueue 합니다 RadialControllerIndependentInputSource.DispatcherQueue .

버전 기록

Windows 버전 SDK 버전 추가된 값
1803 17134 DispatcherQueue

속성

Controller

휠 입력 장치 또는 Surface Dial과 같은 액세서리에 대한 참조를 가져옵니다.

Dispatcher

현재 뷰와 연결된 이벤트 메시지 디스패처를 가져옵니다.

DispatcherQueue

DispatcherQueue와 연결된 RadialControllerIndependentInputSource를 가져옵니다.

메서드

CreateForView(CoreApplicationView)

실행 중인 앱의 RadialControllerIndependentInputSource 현재 CoreWindow인스턴스를 가져옵니다.

적용 대상