Принудительная перерисовка Xamarin.Forms View с помощью пользовательского средства визуализации

У меня есть визуальный элементMyButton с пользовательским рендерером, реализованным для iOS.

Общий:

namespace RendererTest
{
    public class MyButton: Button
    {
        public Color BoundaryColor { get; set; }
    }

    public static class App
    {
        public static Page GetMainPage()
        {    
            var button = new MyButton { Text = "Click me!", BoundaryColor = Color.Red };
            button.Clicked += (sender, e) => (sender as MyButton).BoundaryColor = Color.Blue;
            return new ContentPage { Content = button };
        }
    }
}

IOS:

[assembly:ExportRenderer(typeof(MyButton), typeof(MyButtonRenderer))]

namespace RendererTest.iOS
{
    public class MyButtonRenderer: ButtonRenderer
    {
        public override void Draw(RectangleF rect)
        {
            using (var context = UIGraphics.GetCurrentContext()) {
                context.SetFillColor(Element.BackgroundColor.ToCGColor());
                context.SetStrokeColor((Element as MyButton).BoundaryColor.ToCGColor());
                context.SetLineWidth(10);
                context.AddPath(CGPath.FromRect(Bounds));
                context.DrawPath(CGPathDrawingMode.FillStroke);
            }
        }
    }
}

При нажатии на кнопку красная граница должна стать синей. По всей видимости, средство визуализации не замечает измененного свойства. Как я могу вызвать перерисовку?

(Этот пример для iOS. Но мой вопрос относится и к Android.)

Ответы на вопрос(2)

Ваш ответ на вопрос