コード例 #1
0
ファイル: EnableImage.cs プロジェクト: GemHu/VViiGGEETT_VV33
        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)));
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 static MyImage()
 {
     SourceProperty.OverrideMetadata(typeof(MyImage), new FrameworkPropertyMetadata(SourcePropertyChanged));
 }
コード例 #4
0
ファイル: MultiFrameImage.cs プロジェクト: qqzhw/HcdzManage
 static MultiFrameImage()
 {
     SourceProperty.OverrideMetadata(typeof(MultiFrameImage), new FrameworkPropertyMetadata(OnSourceChanged));
 }
コード例 #5
0
ファイル: GreyableImage.cs プロジェクト: techu/RedisExplorer
 /// <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));
 }
コード例 #6
0
 /// <summary>
 /// static constructor to hook up dependency property overrides etc.
 /// </summary>
 static ImageCropperControl()
 {
     SourceProperty.OverrideMetadata(typeof(ImageCropperControl),
                                     new FrameworkPropertyMetadata(null, SourcePropertyChanged));
 }
コード例 #7
0
ファイル: MultiSizeImage.cs プロジェクト: modulexcite/Eto-1
 static MultiSizeImage()
 {
     // Tell WPF to inform us whenever the Source dependency property is changed
     SourceProperty.OverrideMetadata(typeof(MultiSizeImage), new FrameworkPropertyMetadata(HandleSourceChanged));
 }
コード例 #8
0
 /// <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)));
 }