Esempio n. 1
0
 /// <summary>
 /// Causes the calling code to block, waiting the specified number of milliseconds, for the
 /// associated window to enter an idle state.
 /// </summary>
 /// <remarks>
 /// The implementation is dependent on the underlying application framework therefore this
 /// call may return sometime after the window is ready for user input.  The calling code
 /// should not rely on this call to understand exactly when the window has become idle.
 ///
 /// For now this method works reliably for both WinFx and Win32 Windows that are starting
 /// up.  However, if called at other times on WinFx Windows (e.g. during a long layout)
 /// WaitForInputIdle may return true before the Window is actually idle.  Additional work
 /// needs to be done to detect when WinFx Windows are idle.
 /// </remarks>
 /// <param name="milliseconds">The amount of time, in milliseconds, to wait for the
 /// associated process to become idle. The maximum is the largest possible value of a
 /// 32-bit integer, which represents infinity to the operating system
 /// </param>
 /// <returns>
 /// returns true if the window has reached the idle state and false if the timeout occurred.
 /// </returns>
 public bool WaitForInputIdle(int milliseconds)
 {
     return(UiaCoreApi.WindowPattern_WaitForInputIdle(_hPattern, milliseconds));
 }