コード例 #1
0
        /// <summary>
        /// SourceProxy property changed notification handler. Called when SourceProxy value changes.
        /// </summary>
        private static void OnChangedSourceProxy(DependencyObject o, DependencyPropertyChangedEventArgs args)
        {
            GreyableImage self = o as GreyableImage;

            if (null != self)
            {
                self.Source = args.NewValue as ImageSource;
            }
        }
コード例 #2
0
        /// <summary>
        /// OpacityMaskProxy property changed notification handler. Called when OpacityMaskProxy value changes.
        /// </summary>
        private static void OnChangedOpacityMaskProxy(DependencyObject o, DependencyPropertyChangedEventArgs args)
        {
            GreyableImage self = o as GreyableImage;

            if (null != self)
            {
                self.OpacityMask = args.NewValue as Brush;
            }
        }