Created
July 14, 2017 17:58
-
-
Save baileysh9/47345e45d01b3b11de581d1237db70cf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public GradientTestPage() | |
{ | |
InitializeComponent(); | |
Color[] gradientColors = new Color[] { Color.Black, Color.Orange, Color.Black }; | |
GradientModel g = new GradientModel() | |
{ | |
GradientColors = gradientColors, | |
ViewWidth = 300, | |
ViewHeight = 50, | |
RoundCorners = true, | |
CornerRadius = 10, | |
LeftToRight = true | |
}; | |
gradientView.SetBinding(GradientViewRender.GradientColorsProperty, "GradientColors"); | |
gradientView.SetBinding(GradientViewRender.CornerRadiusProperty, "CornerRadius"); | |
gradientView.SetBinding(GradientViewRender.ViewWidthProperty, "ViewWidth"); | |
gradientView.SetBinding(GradientViewRender.ViewHeightProperty, "ViewHeight"); | |
gradientView.SetBinding(GradientViewRender.RoundCornersProperty, "RoundCorners"); | |
gradientView.SetBinding(GradientViewRender.LeftToRightProperty, "LeftToRight"); | |
gradientView.BindingContext = g; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment