static EnableImage() { SnapsToDevicePixelsProperty.OverrideMetadata(typeof(EnableImage), new FrameworkPropertyMetadata(true)); //UseLayoutRoundingProperty.OverrideMetadata(typeof(EnableImage), new FrameworkPropertyMetadata(false)); RenderOptions.EdgeModeProperty.OverrideMetadata(typeof(EnableImage), new FrameworkPropertyMetadata(EdgeMode.Aliased)); SourceProperty.OverrideMetadata(typeof(EnableImage), new FrameworkPropertyMetadata(new PropertyChangedCallback(OnSourceChanged))); IsEnabledProperty.OverrideMetadata(typeof(EnableImage), new FrameworkPropertyMetadata(true, new PropertyChangedCallback(OnIsEnabledChanged))); }
static AppIconImage() { StretchProperty.OverrideMetadata(typeof(AppIconImage), new FrameworkPropertyMetadata(Stretch.Uniform)); SourceProperty.OverrideMetadata(typeof(AppIconImage), new FrameworkPropertyMetadata(null, new PropertyChangedCallback(SourceChanged), new CoerceValueCallback(SourceCoerceCallback))); string exePath = GetExePath(); __appSmallIcon = IconReader.GetFileIcon(exePath, IconReader.IconSize.Small, false); //__appLargeIcon = IconReader.GetFileIcon(exePath, IconReader.IconSize.Large, false); }
static MyImage() { SourceProperty.OverrideMetadata(typeof(MyImage), new FrameworkPropertyMetadata(SourcePropertyChanged)); }
static MultiFrameImage() { SourceProperty.OverrideMetadata(typeof(MultiFrameImage), new FrameworkPropertyMetadata(OnSourceChanged)); }
/// <summary> /// Initializes a new instance of the <see cref="GreyableImage"/> class. /// </summary> static GreyableImage() { // Override the metadata of the IsEnabled and Source property. IsEnabledProperty.OverrideMetadata(typeof(GreyableImage), new FrameworkPropertyMetadata(true, OnAutoGreyScaleImageIsEnabledPropertyChanged)); SourceProperty.OverrideMetadata(typeof(GreyableImage), new FrameworkPropertyMetadata(null, OnAutoGreyScaleImageSourcePropertyChanged)); }
/// <summary> /// static constructor to hook up dependency property overrides etc. /// </summary> static ImageCropperControl() { SourceProperty.OverrideMetadata(typeof(ImageCropperControl), new FrameworkPropertyMetadata(null, SourcePropertyChanged)); }
static MultiSizeImage() { // Tell WPF to inform us whenever the Source dependency property is changed SourceProperty.OverrideMetadata(typeof(MultiSizeImage), new FrameworkPropertyMetadata(HandleSourceChanged)); }
/// <summary> /// Initializes static members of the <see cref="AutoDisabledImage"/> class. /// </summary> static AutoDisabledImage() { // Override the metadata of the IsEnabled and Source properties to be notified of changes IsEnabledProperty.OverrideMetadata(typeof(AutoDisabledImage), new FrameworkPropertyMetadata(true, new PropertyChangedCallback(PropertyChanged))); SourceProperty.OverrideMetadata(typeof(AutoDisabledImage), new FrameworkPropertyMetadata(null, new PropertyChangedCallback(PropertyChanged))); }