Esempio n. 1
0
        private static void IsAlwaysHalfSizeChanged(
            DependencyObject source,
            DependencyPropertyChangedEventArgs e)
        {
            CustomPictureBox customPictureBox = source as CustomPictureBox;

            if (DesignerProperties.GetIsInDesignMode((DependencyObject)customPictureBox))
            {
                return;
            }
            customPictureBox.SetDefaultImage();
        }
Esempio n. 2
0
        private static void IsImageHoverChanged(
            DependencyObject source,
            DependencyPropertyChangedEventArgs e)
        {
            CustomPictureBox customPictureBox = source as CustomPictureBox;

            if (DesignerProperties.GetIsInDesignMode((DependencyObject)customPictureBox))
            {
                return;
            }
            if (customPictureBox.IsImageHover)
            {
                customPictureBox.SetHoverImage();
            }
            else
            {
                customPictureBox.SetDefaultImage();
            }
        }