2017-08-18 13 views
0

UWPアプリケーションでポインタモードを無効にする方法を知りました。私はすでにXYFocusKeyboardNavigationをセットアップしています。私は自分のXboxのコントローラーを自分のPCに接続するとすべてが完璧に動作します。コンソールにデバッグするたびに、典型的なxboxコントロールの代わりにポインタがあります。私は、次のコマンドを追加して、それを無効にすることを試みたが、何も働いていない、助けてください:Xbox One(C#、UWP)のポインタモードを無効にする方法

RequiresPointer="Never" //At Page Level 

this.RequiresPointer = RequiresPointer.Never; //On Load 

RequiresPointerMode = "WhenRequested" //In App.xaml 

this.RequiresPointerMode = Windows.UI.Xaml.ApplicationRequiresPointerMode.WhenRequested; //tried on load but requirespointermode does not exist 

Application.Current.RequiresPointerMode = ApplicationRequiresPointerMode.WhenRequested; //tried on load but got Error: System.NotSupportedException: 'Specified method is not supported.' 

答えて

1

を、私は私のコンソールにデバッグするときはいつでも、私が代わりに、典型的なXboxのコントロールのポインタを持っています。

App.xamlを this.RequiresPointerMode = Windows.UI.Xaml.ApplicationRequiresPointerMode.WhenRequested; //tried on load but requirespointermode does not exist

マウスモードをオフにするには、アプリのコンストラクタに以下を追加し

:私は、次のコマンドを追加して、それを無効にすることを試みたが、何も働いていない、助けてください。 CS

public App() 
{ 
    this.InitializeComponent(); 
    this.RequiresPointerMode = Windows.UI.Xaml.ApplicationRequiresPointerMode.WhenRequested; 
    this.Suspending += OnSuspending; 
} 

注:

C++/DirectXアプリケーションを作成している場合は、何もしません。マウスモードは、HTMLおよびXAMLアプリケーションにのみ適用されます。

詳細については、How to disable mouse modeを参照してください。

+0

定義this.RequiresPointerMode、SuspendingとOnSuspendingは存在しません....私はしばらく前にそれを試みました。何か案は? – tadll122101

+0

あなたの 'App.xaml.cs'ファイルに上記のコードを書いてください。 –

+0

'RequiresPointerMode'は' Application'プロパティです。あなたの 'App.xaml.cs'ファイルに上記のコードを書くべきです。またはコンパイルエラーが発生します。 – CoCaIceDew

関連する問題