Пример #1
0
        private void Ini()
        {
            //ini normal properties
            //Topmost = true;
            WindowStyle   = WindowStyle.None;
            ResizeMode    = ResizeMode.NoResize;
            ShowInTaskbar = false;

            //set bounds to cover all screens
            var rect = SystemInformation.VirtualScreen;

            Left   = rect.X;
            Top    = rect.Y;
            Width  = rect.Width;
            Height = rect.Height;

            //set background
            screenSnapshot = HelperMethods.GetScreenSnapshot();
            if (screenSnapshot != null)
            {
                var bmp = screenSnapshot.ToBitmapSource();
                bmp.Freeze();
                Background = new ImageBrush(bmp);
            }

            //ini canvas
            innerCanvas = new MaskCanvas
            {
                MaskWindowOwner = this
            };
            Content = innerCanvas;
        }
Пример #2
0
        private void Ini()
        {
            
            //ini normal properties
            //Topmost = true;
            WindowStyle = WindowStyle.None;
            ResizeMode = ResizeMode.NoResize;
            ShowInTaskbar = false;

            //set bounds to cover all screens
            var rect = SystemInformation.VirtualScreen;
            Left = rect.X;
            Top = rect.Y;
            Width = rect.Width;
            Height = rect.Height;

            //set background 
            screenSnapshot = HelperMethods.GetScreenSnapshot();
            if (screenSnapshot != null)
            {
                var bmp = screenSnapshot.ToBitmapSource();
                bmp.Freeze();
                Background = new ImageBrush(bmp);
            }

            //ini canvas
            innerCanvas = new MaskCanvas
            {
                MaskWindowOwner = this
            };
            Content = innerCanvas;

        }
Пример #3
0
 public IndicatorObject(MaskCanvas canvasOwner)
 {
     this.canvasOwner = canvasOwner;
 }
Пример #4
0
 public IndicatorObject(MaskCanvas canvasOwner)
 {
     this.canvasOwner = canvasOwner;
 }