Beispiel #1
0
 public static T Fill <T>(this T shape, Color fill, RxColorAnimation customAnimation = null) where T : IRxShape
 {
     shape.Fill = new SolidColorBrush(fill);
     shape.AppendAnimatable(Shape.FillProperty, customAnimation ?? new RxSimpleColorAnimation(fill), v => shape.Fill = new SolidColorBrush(v.CurrentValue()));
     return(shape);
 }
Beispiel #2
0
 public static T Stroke <T>(this T shape, Color stroke, RxColorAnimation customAnimation = null) where T : IRxShape
 {
     shape.Stroke = new SolidColorBrush(stroke);
     shape.AppendAnimatable(Shape.StrokeProperty, customAnimation ?? new RxSimpleColorAnimation(stroke), v => shape.Stroke = new SolidColorBrush(v.CurrentValue()));
     return(shape);
 }
 public static T BackgroundColor <T>(this T visualelement, Color backgroundColor, RxColorAnimation customAnimation = null) where T : IRxVisualElement
 {
     visualelement.BackgroundColor = backgroundColor;
     visualelement.AppendAnimatable(VisualElement.WidthRequestProperty, customAnimation ?? new RxSimpleColorAnimation(backgroundColor), v => visualelement.BackgroundColor = v.CurrentValue());
     return(visualelement);
 }