Example #1
0
        /// <summary>
        /// Event raised when the IsMouseOverShowEnabled property has changed.
        /// </summary>
        private static void IsMouseOverShowEnabled_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
        {
            ImprovedAdornedControl c = (ImprovedAdornedControl)o;

            c.closeAdornerTimer.Stop();
            c.HideAdorner();
        }
Example #2
0
        /// <summary>
        /// Event raised when the value of AdornerContent has changed.
        /// </summary>
        private static void AdornerContent_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
        {
            ImprovedAdornedControl c = (ImprovedAdornedControl)o;

            c.ShowOrHideAdornerInternal();

            FrameworkElement oldAdornerContent = (FrameworkElement)e.OldValue;

            if (oldAdornerContent != null)
            {
                oldAdornerContent.MouseEnter -= new MouseEventHandler(c.adornerContent_MouseEnter);
                oldAdornerContent.MouseLeave -= new MouseEventHandler(c.adornerContent_MouseLeave);
            }

            FrameworkElement newAdornerContent = (FrameworkElement)e.NewValue;

            if (newAdornerContent != null)
            {
                newAdornerContent.MouseEnter += new MouseEventHandler(c.adornerContent_MouseEnter);
                newAdornerContent.MouseLeave += new MouseEventHandler(c.adornerContent_MouseLeave);
            }
        }
Example #3
0
        /// <summary>
        /// Event raised when the CloseAdornerTimeOut property has change.
        /// </summary>
        private static void CloseAdornerTimeOut_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
        {
            ImprovedAdornedControl c = (ImprovedAdornedControl)o;

            c.closeAdornerTimer.Interval = TimeSpan.FromSeconds(c.CloseAdornerTimeOut);
        }
Example #4
0
        /// <summary>
        /// Event raised when the value of IsAdornerVisible has changed.
        /// </summary>
        private static void IsAdornerVisible_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
        {
            ImprovedAdornedControl c = (ImprovedAdornedControl)o;

            c.ShowOrHideAdornerInternal();
        }
Example #5
0
        /// <summary>
        /// Event raised when the FadeOut command is executed.
        /// </summary>
        private static void FadeOutAdornerCommand_Executed(object target, ExecutedRoutedEventArgs e)
        {
            ImprovedAdornedControl c = (ImprovedAdornedControl)target;

            c.FadeOutAdorner();
        }