It is possible to draw, but if you change the color, the color will change even to the line you drew before changing the color.
Reset the StrokeColor of all the polylines stored before .
Modification based on official sample .
Override SelectedIndexChanged method of Picker in FingerPaintPage.
Retrieve the polyline list and reset their color , and then call canvasView.InvalidateSurface(); .
private void colorPicker_SelectedIndexChanged(object sender, EventArgs e)
foreach (FingerPaintPolyline polyline in completedPolylines)
polyline.StrokeColor = (Color)typeof(Color).GetRuntimeField(colorPicker.Items[colorPicker.SelectedIndex]).GetValue(null);
Then all the polylines drew before will change the new color .
Xamarin forums are migrating to a new home on Microsoft Q&A!
We invite you to post new questions in the Xamarin forums’ new home on Microsoft Q&A!
For more information, please refer to this sticky post.
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies