GlowingWindow.Glowing.GlowWindowProcessor.GetWidth C# (CSharp) Méthode

GetWidth() public abstract méthode

派生クラスでオーバーライドされると、GlowWindow の横幅を取得します。
public abstract GetWidth ( double ownerLeft, double ownerWidth ) : double
ownerLeft double アタッチ先ウィンドウの左端座標。
ownerWidth double アタッチ先ウィンドウの現在の横幅。
Résultat double
        public abstract double GetWidth(double ownerLeft, double ownerWidth);

Usage Example

Exemple #1
0
        internal GlowWindow(MetroChromeBehavior behavior, GlowWindowProcessor processor)
        {
            this.owner     = behavior.Window;
            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(this.owner.Left, this.owner.ActualWidth);
            this.Top         = processor.GetTop(this.owner.Top, this.owner.ActualHeight);
            this.Width       = processor.GetWidth(this.owner.Left, this.owner.ActualWidth);
            this.Height      = processor.GetHeight(this.owner.Top, this.owner.ActualHeight);
            this.Orientation = processor.Orientation;
            this.HorizontalContentAlignment = processor.HorizontalAlignment;
            this.VerticalContentAlignment   = processor.VerticalAlignment;

            this.ownerState = this.WindowState;

            var bindingActive = new Binding("ActiveBrush")
            {
                Source = behavior,
            };

            this.SetBinding(ActiveGlowBrushProperty, bindingActive);

            var bindingInactive = new Binding("InactiveBrush")
            {
                Source = behavior,
            };

            this.SetBinding(InactiveGlowBrushProperty, bindingInactive);

            var bindingChromeMode = new Binding("Mode")
            {
                Source = behavior,
            };

            this.SetBinding(ChromeModeProperty, bindingChromeMode);

            this.owner.ContentRendered += (sender, args) =>
            {
                this.Show();
                this.Update();
            };
            this.owner.StateChanged += (sender, args) =>
            {
                this.Update();
                this.ownerState = this.owner.WindowState;
            };
            this.owner.LocationChanged += (sender, args) => this.Update();
            this.owner.SizeChanged     += (sender, args) => this.Update();
            this.owner.Activated       += (sender, args) => this.Update();
            this.owner.Deactivated     += (sender, args) => this.Update();
            this.owner.Closed          += (sender, args) => this.Close();
        }
All Usage Examples Of GlowingWindow.Glowing.GlowWindowProcessor::GetWidth