示例#1
0
        internal GlowWindow(Window owner, GlowWindowProcessor processor)
        {
            this.owner     = owner;
            this.processor = processor;

            this.WindowStyle           = WindowStyle.None;
            this.AllowsTransparency    = true;
            this.ShowActivated         = false;
            this.Visibility            = Visibility.Collapsed;
            this.ResizeMode            = ResizeMode.NoResize;
            this.WindowStartupLocation = WindowStartupLocation.Manual;
            this.Left        = processor.GetLeft(owner.Left, owner.ActualWidth);
            this.Top         = processor.GetTop(owner.Top, owner.ActualHeight);
            this.Width       = processor.GetWidth(owner.Left, owner.ActualWidth);
            this.Height      = processor.GetHeight(owner.Top, owner.ActualHeight);
            this.Orientation = processor.Orientation;
            this.HorizontalContentAlignment = processor.HorizontalAlignment;
            this.VerticalContentAlignment   = processor.VerticalAlignment;

            var bindingActive = new Binding("BorderBrush")
            {
                Source = this.owner,
            };

            this.SetBinding(ActiveGlowBrushProperty, bindingActive);

            var bindingInactive = new Binding("InactiveBorderBrush")
            {
                Source = this.owner,
            };

            this.SetBinding(InactiveGlowBrushProperty, bindingInactive);
        }
示例#2
0
        internal GlowWindow(Window owner, GlowWindowProcessor processor)
        {
            this.owner = owner;
            this.processor = processor;

            this.WindowStyle = WindowStyle.None;
            this.AllowsTransparency = true;
            this.ShowActivated = false;
            this.Visibility = Visibility.Collapsed;
            this.ResizeMode = ResizeMode.NoResize;
            this.WindowStartupLocation = WindowStartupLocation.Manual;
            this.Left = processor.GetLeft(owner.Left, owner.ActualWidth);
            this.Top = processor.GetTop(owner.Top, owner.ActualHeight);
            this.Width = processor.GetWidth(owner.Left, owner.ActualWidth);
            this.Height = processor.GetHeight(owner.Top, owner.ActualHeight);
            this.Orientation = processor.Orientation;
            this.HorizontalContentAlignment = processor.HorizontalAlignment;
            this.VerticalContentAlignment = processor.VerticalAlignment;

            var bindingActive = new Binding("BorderBrush") { Source = this.owner, };
            this.SetBinding(ActiveGlowBrushProperty, bindingActive);

            var bindingInactive = new Binding("InactiveBorderBrush") { Source = this.owner, };
            this.SetBinding(InactiveGlowBrushProperty, bindingInactive);
        }
示例#3
0
        internal GlowWindow(Window owner, GlowWindowProcessor processor)
        {
            this.owner = owner;
            this.processor = processor;

            this.WindowStyle = WindowStyle.None;
            this.AllowsTransparency = true;
            this.ShowActivated = false;
            this.Visibility = Visibility.Collapsed;
            this.ResizeMode = ResizeMode.NoResize;
            this.WindowStartupLocation = WindowStartupLocation.Manual;
            this.Left = processor.GetLeft(owner.Left, owner.ActualWidth);
            this.Top = processor.GetTop(owner.Top, owner.ActualHeight);
            this.Width = processor.GetWidth(owner.Left, owner.ActualWidth);
            this.Height = processor.GetHeight(owner.Top, owner.ActualHeight);
            this.Orientation = processor.Orientation;
            this.HorizontalContentAlignment = processor.HorizontalAlignment;
            this.VerticalContentAlignment = processor.VerticalAlignment;
        }
示例#4
0
        internal GlowWindow(Window owner, GlowWindowProcessor processor)
        {
            this.owner     = owner;
            this.processor = processor;

            this.WindowStyle           = WindowStyle.None;
            this.AllowsTransparency    = true;
            this.ShowActivated         = false;
            this.Visibility            = Visibility.Collapsed;
            this.ResizeMode            = ResizeMode.NoResize;
            this.WindowStartupLocation = WindowStartupLocation.Manual;
            this.Left        = processor.GetLeft(owner.Left, owner.ActualWidth);
            this.Top         = processor.GetTop(owner.Top, owner.ActualHeight);
            this.Width       = processor.GetWidth(owner.Left, owner.ActualWidth);
            this.Height      = processor.GetHeight(owner.Top, owner.ActualHeight);
            this.Orientation = processor.Orientation;
            this.HorizontalContentAlignment = processor.HorizontalAlignment;
            this.VerticalContentAlignment   = processor.VerticalAlignment;
        }