Ejemplo n.º 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(); }));
        }
Ejemplo n.º 2
0
 private static object CoerceOpacity(DependencyObject d, object value)
 {
     if ((double)value != (double)OpacityProperty.GetDefaultValue(typeof(BitmapCacheBrush)))
     {
         throw new InvalidOperationException(SR.Get(SRID.BitmapCacheBrush_OpacityChanged));
     }
     return(1.0);
 }
Ejemplo n.º 3
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)));
 }
Ejemplo n.º 4
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)));
        }
Ejemplo n.º 5
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));
 }
Ejemplo n.º 6
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); }));
 }
Ejemplo n.º 9
0
 set => SetValue(OpacityProperty, value);
Ejemplo n.º 10
0
 static ResizeThumb()
 {
     OpacityProperty.OverrideMetadata(typeof(ResizeThumb), new FrameworkPropertyMetadata(0.0));
 }
Ejemplo n.º 11
0
 static FontAwesome()
 {
     OpacityProperty.OverrideMetadata(typeof(FontAwesome), new UIPropertyMetadata(1.0, OpacityChanged));
 }
Ejemplo n.º 12
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));
 }
Ejemplo n.º 14
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));
 }
Ejemplo n.º 15
0
 static PackIconControl()
 {
     OpacityProperty.OverrideMetadata(typeof(PackIconControl <TKind>), new UIPropertyMetadata(1d));
     VisibilityProperty.OverrideMetadata(typeof(PackIconControl <TKind>), new UIPropertyMetadata(Visibility.Visible));
 }
Ejemplo n.º 16
0
 static FontAwesome()
 {
     OpacityProperty.OverrideMetadata(typeof(FontAwesome), (PropertyMetadata) new UIPropertyMetadata(defaultValue: (object)1.0, new PropertyChangedCallback(OpacityChanged)));
 }