private void OnLoaded(object sender, RoutedEventArgs e) { hwnd = new WindowInteropHelper(this).Handle; GlassHelper.EnableAero(hwnd); textbox_input.TextChanged += OnTextChanged; IsVisibleChanged += OnIsVisibleChanged; list_actions.PreviewMouseLeftButtonDown += OnListPreviewLeftMouseButtonDown; Deactivated += OnDeactived; PreviewKeyDown += OnPreviewKeyDown; ElementHost.EnableModelessKeyboardInterop(this); }
private void OnLoaded(object sender, RoutedEventArgs e) { hwnd = new WindowInteropHelper(this).Handle; GlassHelper.EnableAero(hwnd); HwndSource source = PresentationSource.FromVisual(this) as HwndSource; source.AddHook(WndProc); ClipboardHelper.AddClipboardFormatListener(hwnd); double x1 = SystemParameters.PrimaryScreenWidth; double y1 = SystemParameters.PrimaryScreenHeight; double left = x1 - 20 - ActualWidth; double top = SystemParameters.WorkArea.Top + 20; this.Left = left; this.Top = top; RetriveWordInformation("test"); }
private void OnLoaded(object sender, RoutedEventArgs e) { double screenWidth = SystemParameters.PrimaryScreenWidth; double screenHeight = SystemParameters.PrimaryScreenHeight; Rect primaryArea = SystemParameters.WorkArea; double offsetTop = primaryArea.Top; double offsetLeft = primaryArea.Right - this.Width; double panelHeight = primaryArea.Height; this.Left = offsetLeft; this.Height = panelHeight; this.Top = offsetTop; WindowInteropHelper interopHelper = new WindowInteropHelper(this); GlassHelper.EnableAero(interopHelper.Handle); LoadTray(); LoadItemsAsync(); }