Beispiel #1
0
 /// <summary>
 /// Sets the passed <see cref="T:XFGloss.Gradient"/> value as the currently assigned background gradient for
 /// the passed <see cref="T:Xamarin.Forms.BindableObject"/>.
 /// </summary>
 /// <param name="bindable">The <see cref="T:Xamarin.Forms.BindableObject"/> that the BackgroundGradient attached
 /// property value should be assigned to.</param>
 /// <param name="value">The <see cref="T:XFGloss.Gradient"/> value that should be assigned to the passed
 /// <see cref="T:Xamarin.Forms.BindableObject"/>.</param>
 public static void SetBackgroundGradient(BindableObject bindable, Gradient value)
 {
     bindable?.SetValue(BackgroundGradientProperty, value);
 }
Beispiel #2
0
 /// <summary>
 /// Copy constructor. Will copy the properties of another <see cref="T:XFGloss.Gradient"/> instance to the
 /// newly-constructed one.  The Steps <see cref="T:XFGloss.GradientStepCollection"/> is deeply copied, i.e.,
 /// new <see cref="T:XFGloss.GradientStep"/> instances are constructed using the
 /// <see cref="T:XFGloss.GradientStep"/> copy constructor, then assigned to a new GradientStepCollection
 /// instance.
 /// </summary>
 /// <param name="other">Specifies the other Gradient instance whose properties will be copied to the new instance.</param>
 public Gradient(Gradient other)
 {
     Rotation = other.Rotation;
     Steps    = new GradientStepCollection(other.Steps);
 }