Exemplo n.º 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;

        }
Exemplo n.º 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;
        }
Exemplo n.º 3
0
 public IndicatorObject(MaskCanvas canvasOwner)
 {
     this.canvasOwner = canvasOwner;
 }
Exemplo n.º 4
0
 public IndicatorObject(MaskCanvas canvasOwner)
 {
     this.canvasOwner = canvasOwner;
 }