Пример #1
0
        static Thumbnail()
        {
            SourceProperty = DependencyProperty.Register(
                "Source",
                typeof(IntPtr),
                typeof(Thumbnail),
                new FrameworkPropertyMetadata(
                    IntPtr.Zero,
                    FrameworkPropertyMetadataOptions.AffectsMeasure,
                    delegate(DependencyObject obj, DependencyPropertyChangedEventArgs args) { ((Thumbnail)obj).InitialiseThumbnail((IntPtr)args.NewValue); }));

            ClientAreaOnlyProperty = DependencyProperty.Register(
                "ClientAreaOnly",
                typeof(bool),
                typeof(Thumbnail),
                new FrameworkPropertyMetadata(
                    false,
                    FrameworkPropertyMetadataOptions.AffectsMeasure,
                    delegate(DependencyObject obj, DependencyPropertyChangedEventArgs args) { ((Thumbnail)obj).UpdateThumbnail(); }));

            OpacityProperty.OverrideMetadata(
                typeof(Thumbnail),
                new FrameworkPropertyMetadata(
                    1.0,
                    FrameworkPropertyMetadataOptions.Inherits,
                    delegate(DependencyObject obj, DependencyPropertyChangedEventArgs args) { ((Thumbnail)obj).UpdateThumbnail(); }));
        }
Пример #2
0
 static IconFontControl()
 {
     OpacityProperty.OverrideMetadata(typeof(IconFontControl <TKind>),
                                      new UIPropertyMetadata(1.0,
                                                             (d, e) => d.CoerceValue(SpinProperty)));
     VisibilityProperty.OverrideMetadata(typeof(IconFontControl <TKind>),
                                         new UIPropertyMetadata(Visibility.Visible,
                                                                (d, e) => d.CoerceValue(SpinProperty)));
 }
Пример #3
0
        static LiveToolTip()
        {
            var thisType = typeof(LiveToolTip);

            DefaultStyleKeyProperty.OverrideMetadata(thisType, new FrameworkPropertyMetadata(thisType));
            FocusableProperty.OverrideMetadata(thisType, new FrameworkPropertyMetadata(false));
            IsHitTestVisibleProperty.OverrideMetadata(thisType, new FrameworkPropertyMetadata(false));
            BackgroundProperty.OverrideMetadata(thisType, new FrameworkPropertyMetadata(Brushes.White));
            OpacityProperty.OverrideMetadata(thisType, new FrameworkPropertyMetadata(1.0));
            BorderBrushProperty.OverrideMetadata(thisType, new FrameworkPropertyMetadata(Brushes.DarkGray));
            BorderThicknessProperty.OverrideMetadata(thisType, new FrameworkPropertyMetadata(new Thickness(1.0)));
        }
Пример #4
0
 /// <summary>
 /// 静的コンストラクタ
 /// </summary>
 static MessageStatusBar()
 {
     DefaultStyleKeyProperty.OverrideMetadata(
         typeof(MessageStatusBar),
         new FrameworkPropertyMetadata(typeof(MessageStatusBar)));
     OpacityProperty.OverrideMetadata(
         typeof(MessageStatusBar),
         new FrameworkPropertyMetadata(0.0));
     HorizontalContentAlignmentProperty.OverrideMetadata(
         typeof(MessageStatusBar),
         new FrameworkPropertyMetadata(HorizontalAlignment.Right));
 }
Пример #5
0
 /// <summary>Initializes the <see cref="ThumbnailImage"/> class.
 /// </summary>
 static ThumbnailImage()
 {
     OpacityProperty.OverrideMetadata(
         typeof(ThumbnailImage),
         new FrameworkPropertyMetadata(
             1.0,
             FrameworkPropertyMetadataOptions.Inherits,
             delegate(DependencyObject obj, DependencyPropertyChangedEventArgs args)
     {
         ((ThumbnailImage)obj).UpdateThumbnail();
     }));
     //This OverrideMetadata call tells the system that this element wants to provide a style that is different than its base class.
     //This style is defined in themes\generic.xaml
     DefaultStyleKeyProperty.OverrideMetadata(typeof(ThumbnailImage), new FrameworkPropertyMetadata(typeof(ThumbnailImage)));
 }
 static ImageThemify()
 {
     OpacityProperty.OverrideMetadata(typeof(ImageThemify), new UIPropertyMetadata(1.0, OpacityChanged));
 }
 static PackIconControlBase()
 {
     OpacityProperty.OverrideMetadata(typeof(PackIconControlBase), new UIPropertyMetadata(1d, (d, e) => { d.CoerceValue(SpinProperty); }));
     VisibilityProperty.OverrideMetadata(typeof(PackIconControlBase), new UIPropertyMetadata(Visibility.Visible, (d, e) => { d.CoerceValue(SpinProperty); }));
 }
Пример #8
0
 static ResizeThumb()
 {
     OpacityProperty.OverrideMetadata(typeof(ResizeThumb), new FrameworkPropertyMetadata(0.0));
 }
Пример #9
0
 static FontAwesome()
 {
     OpacityProperty.OverrideMetadata(typeof(FontAwesome), new UIPropertyMetadata(1.0, OpacityChanged));
 }
Пример #10
0
 static ImageAwesome()
 {
     OpacityProperty.OverrideMetadata(typeof(ImageAwesome), (PropertyMetadata) new UIPropertyMetadata((object)1.0, new PropertyChangedCallback(OpacityChanged)));
 }
 static ThemifyIcons()
 {
     OpacityProperty.OverrideMetadata(typeof(ThemifyIcons), new UIPropertyMetadata(1.0, OpacityChanged));
 }
Пример #12
0
 private static void StaticInitialize(Type typeofThis)
 {
     OpacityProperty.OverrideMetadata(typeofThis, new IndependentlyAnimatedPropertyMetadata(1.0, /* PropertyChangedHandle */ null, CoerceOpacity));
     TransformProperty.OverrideMetadata(typeofThis, new UIPropertyMetadata(null, /* PropertyChangedHandle */ null, CoerceTransform));
     RelativeTransformProperty.OverrideMetadata(typeofThis, new UIPropertyMetadata(null, /* PropertyChangedHandle */ null, CoerceRelativeTransform));
 }
Пример #13
0
 static PackIconControl()
 {
     OpacityProperty.OverrideMetadata(typeof(PackIconControl <TKind>), new UIPropertyMetadata(1d));
     VisibilityProperty.OverrideMetadata(typeof(PackIconControl <TKind>), new UIPropertyMetadata(Visibility.Visible));
 }
 static FontAwesome()
 {
     OpacityProperty.OverrideMetadata(typeof(FontAwesome), (PropertyMetadata) new UIPropertyMetadata(defaultValue: (object)1.0, new PropertyChangedCallback(OpacityChanged)));
 }