コード例 #1
0
ファイル: ClawWindowAnimator.cs プロジェクト: UserXXX/Claw
        /// <summary>
        /// Creates a new ClawWindowAnimator for the given window.
        /// </summary>
        /// <param name="window">The ClawWindow to animate.</param>
        public ClawWindowAnimator(ClawWindow window)
        {
            if (window == null)
            {
                throw new ArgumentNullException("window");
            }

            this.window              = window;
            window.IsVisibleChanged += OnIsVisibleChanged;
            window.SizeChanged      += OnSizeChanged;
        }
コード例 #2
0
ファイル: ClawWindowRenderer.cs プロジェクト: UserXXX/Claw
        /// <summary>
        /// Creates a new ClawWindowRenderer.
        /// </summary>
        /// <param name="window">The window to render.</param>
        public ClawWindowRenderer(ClawWindow window)
        {
            if (window == null)
            {
                throw new ArgumentNullException("window");
            }

            this.window = window;

            window.LocationChanged += OnLocationChanged;
            window.SizeChanged     += OnSizeChanged;

            RecreateWindowMask();
        }
コード例 #3
0
ファイル: ClawWindow.cs プロジェクト: UserXXX/Claw
        /// <summary>
        /// Called when the highlights width changed.
        /// </summary>
        /// <param name="d">The dependency object. This is the ClawWindow.</param>
        /// <param name="e">Event arguments.</param>
        private static void OnHighlightWidthChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ClawWindow window = (ClawWindow)d;

            window.InvalidateVisual();
        }