Path
Basic example
View.Path(
stroke = View.SolidColorBrush(Color.Black),
data = Content.fromString "M 10,100 C 100,0 200,200 300,100"
)
Basic example with styling
View.Path(
horizontalOptions = style.Position,
verticalOptions = style.Position,
backgroundColor = style.ViewColor,
stroke = View.SolidColorBrush(Color.Black),
data = Content.fromString "M 10,100 C 100,0 200,200 300,100"
)
See also:
More examples
Path
can be used to draw curves and complex shapes. These curves and shapes are often described using Geometry objects.
// Path
View.Path(
stroke = View.SolidColorBrush(Color.Black),
aspect = Stretch.Uniform,
horizontalOptions = LayoutOptions.Center,
data = Content.fromString "M 10,50 L 200,70"
)
// Cubic Bezier Path
View.Path(
stroke = View.SolidColorBrush(Color.Black),
aspect = Stretch.Uniform,
horizontalOptions = LayoutOptions.Center,
data = Content.fromString "M 10,100 C 100,0 200,200 300,100"
)