コード例 #1
0
ファイル: MaskWindow.cs プロジェクト: LeeMyGithub/H.Framework
        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;
        }
コード例 #2
0
 public IndicatorObject(MaskCanvas canvasOwner)
 {
     this.canvasOwner = canvasOwner;
 }