private void Init() { //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 //AllowsTransparency = true; //Background = new SolidColorBrush(System.Windows.Media.Colors.Black); //Opacity = .3; //screenSnapshot = HelperMethods.GetScreenSnapshot(); //if (screenSnapshot != null) //{ // var bmp = screenSnapshot.ToBitmapSource(); // if (bmp == null) // return; // bmp.Freeze(); // Background = new ImageBrush(bmp); //} //ini canvas innerCanvas = new MaskCanvas { MaskWindowOwner = this }; Content = innerCanvas; }
public IndicatorObject(MaskCanvas canvasOwner) { this.canvasOwner = canvasOwner; }