Exemplo n.º 1
0
        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();
            };
        }
Exemplo n.º 2
0
 /// <summary>
 /// Shows all glow windows
 /// </summary>
 private void Show()
 {
     left.Show();
     right.Show();
     top.Show();
     bottom.Show();
 }
Exemplo n.º 3
0
 public void Show()
 {
     left.Show();
     right.Show();
     top.Show();
     bottom.Show();
 }
Exemplo n.º 4
0
        public MainWindow()
        {
            InitializeComponent();

            GlowWindow w = new GlowWindow();

            w.Show();
        }
Exemplo n.º 5
0
 /// <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();
     }
 }