私はWindows 8タブレット上で動作するwpfアプリケーションを持っています。また、フォーカスがあるときにキーボードを入力するためには、TextBox
が必要です。TabletKeyboard(TabTip.exe)のプロセスを終了した後、アプリケーションは元のサイズ(wpf)に戻りません。
TabTip.exeプロセスを呼び出してキーボードを表示しています。キーボードが表示されているときにアプリケーションが縮小します。すべての操作の後、保存ボタンがあります。保存ボタンをクリックするとキーボードが消え、アプリケーションは元のサイズに戻ります。
キーボードを閉じるためにTabTip.exeプロセスを終了していますが、アプリケーションのサイズを元のサイズに戻すことはできません。
私が試した:
if (process.ProcessName == "TabTip")
{
Application.Current.MainWindow.VerticalAlignment = VerticalAlignment.Stretch;
process.Kill();
Application.Current.MainWindow.Height = SystemParameters.WorkArea.Height;
Application.Current.MainWindow.Width = SystemParameters.WorkArea.Width;
Application.Current.MainWindow.WindowState = WindowState.Normal;
Application.Current.MainWindow.WindowState = WindowState.Maximized;
break;
}
は、誰もがTabTip.exeを殺害した後、元のサイズにアプリケーションを復元するために知っていますか?
(プロセス場合、私は のようにすべてのそれらの事を試してみました。 ProcessName == "TabTip") { Application.Current.MainWindow.VerticalAlignment = VerticalAlignment.Stretch; process.Kill(); Application.Current.MainWindow.Height = SystemParameters.WorkArea.Height; Application.Current.MainWindow.Width = SystemParameters.WorkArea.Width; Application.Current.MainWindow.WindowState = WindowState.Normal; Application.Current.MainWindow.WindowState = WindowState.Maximized; 休憩。 } } –
これは間違いなく、物事をやり遂げる方法と似ています。どうしてあなたは自分でそれを作成したり殺したりしていますか?あなたはそのようなことに気づくべきではありません。 –
プロセスを強制終了せずにキーボードを閉じたり隠したりすることはありません.. !!それらの行動を実行するための他の方法? –