public void RadiusCanBeSetFromStyle() { var rectangle = new FormsRectangle(); Assert.AreEqual(0.0, rectangle.RadiusX); rectangle.SetValue(FormsRectangle.RadiusXProperty, 10.0, true); Assert.AreEqual(10.0, rectangle.RadiusX); Assert.AreEqual(0.0, rectangle.RadiusY); rectangle.SetValue(FormsRectangle.RadiusYProperty, 10.0, true); Assert.AreEqual(10.0, rectangle.RadiusY); }
public async Task ReusedShapeViewReRenderers() { var view = new Microsoft.Maui.Controls.Shapes.Rectangle { Fill = SolidColorBrush.Purple, HeightRequest = 21, WidthRequest = 21, Stroke = SolidColorBrush.Purple }; var expected = await GetRendererProperty(view, (ver) => ver.NativeView.ToBitmap(), requiresLayout : true); var actual = await GetRendererProperty(view, (ver) => ver.NativeView.ToBitmap(), requiresLayout : true); expected.AssertEquals(actual); }