CK.WindowManager.Model.PreviewBindingInfo.Display C# (CSharp) Method

Display() public method

public Display ( IBinding binding ) : void
binding IBinding
return void
        public void Display( IBinding binding )
        {
            if( binding == null ) return;

            if( Window == null )
            {
                Window = new CKWindow();
            }
            Binding = binding;

            Rect r = Binding.GetWindowArea();
            if( r != Rect.Empty )
            {
                Window.Dispatcher.BeginInvoke( new Action( () =>
                {
                    Window.Opacity = .8;
                    Window.Background = new System.Windows.Media.SolidColorBrush( System.Windows.Media.Color.FromRgb( 152, 120, 152 ) );
                    Window.ResizeMode = ResizeMode.NoResize;
                    Window.WindowStyle = WindowStyle.None;
                    Window.ShowInTaskbar = false;
                    Window.Show();
                    Window.Left = r.Left;
                    Window.Top = r.Top;
                    Window.Width = r.Width;
                    Window.Height = r.Height;
                    Window.Topmost = true;
                } ) );
            }
        }