protected override void OnAttached() { base.OnAttached(); this.AssociatedObject.SourceInitialized += (o, args) => { handle = new WindowInteropHelper(this.AssociatedObject).Handle; var hwndSource = HwndSource.FromHwnd(handle); if (hwndSource != null) { hwndSource.AddHook(AssociatedObjectWindowProc); } }; this.AssociatedObject.Loaded += (sender, e) => { this.left = new GlowWindow(this.AssociatedObject, GlowDirection.Left); this.right = new GlowWindow(this.AssociatedObject, GlowDirection.Right); this.top = new GlowWindow(this.AssociatedObject, GlowDirection.Top); this.bottom = new GlowWindow(this.AssociatedObject, GlowDirection.Bottom); left.Show(); left.Update(); right.Show(); right.Update(); top.Show(); top.Update(); bottom.Show(); bottom.Update(); }; }
/// <summary> /// Shows all glow windows /// </summary> private void Show() { left.Show(); right.Show(); top.Show(); bottom.Show(); }
public void Show() { left.Show(); right.Show(); top.Show(); bottom.Show(); }
public MainWindow() { InitializeComponent(); GlowWindow w = new GlowWindow(); w.Show(); }
/// <summary> /// Shows all glow windows /// </summary> private void Show() { if (left != null) { left.Show(); } if (right != null) { right.Show(); } if (top != null) { top.Show(); } if (bottom != null) { bottom.Show(); } }