// 윈도우 로드, 클로즈 시 Work area 변경 private void Window_Loaded(object sender, RoutedEventArgs e) { SHDocVw.ShellWindows shellWindows = new SHDocVw.ShellWindows(); IntPtr handle = GetForegroundWindow(); foreach (SHDocVw.WebBrowser IE in shellWindows) { if (IE.HWND.Equals(handle.ToInt32())) { while (IE.Busy == true || IE.ReadyState != SHDocVw.tagREADYSTATE.READYSTATE_COMPLETE) { System.Threading.Thread.Sleep(100); } doc = IE.Document as mshtml.HTMLDocument; } } if (doc != null) { // Document 속성 읽기 currentUri = new Uri(doc.url); currentHost = currentUri.Host; } AppBarFunctions.SetAppBar(this, ABEdge.Left); }
private void Window_Closed(object sender, EventArgs e) { AppBarFunctions.SetAppBar(this, ABEdge.None); System.Windows.Application.Current.Shutdown(); // 모든 자식과 함께 종료 }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { AppBarFunctions.SetAppBar(this, ABEdge.None); System.Windows.Application.Current.Shutdown(); // 모든 자식과 함께 종료 }
// 윈도우 로드, 클로즈 시 Work area 변경 private void Window_Loaded(object sender, RoutedEventArgs e) { AppBarFunctions.SetAppBar(this, ABEdge.Right); }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { AppBarFunctions.SetAppBar(this, ABEdge.None); }