calculator/internal/Calculator.UIAutomationLibrary/Utilities/WindowHelper.cs
Howard Wolosky c13b8a099e Hello GitHub
2019-01-28 16:24:37 -08:00

19 lines
506 B
C#

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using MS.Internal.Mita.Foundation.Controls;
using WEX.Logging.Interop;
namespace Calculator.UIAutomationLibrary
{
public class WindowHelper
{
public static void SetAsForeground(Window window)
{
Log.Comment($"Set window {window.NativeWindowHandle} as the foreground window.");
NativeMethods.SetForegroundWindow(window.NativeWindowHandle);
}
}
}