public void HeightRequest() { View child; var contentView = new ContentView { Padding = new Thickness(10), Content = child = new View { WidthRequest = 100, HeightRequest = 200, IsPlatformEnabled = true, }, IsPlatformEnabled = true, HeightRequest = 20 }; Assert.AreEqual(new Size(120, 40), contentView.GetSizeRequest(double.PositiveInfinity, double.PositiveInfinity).Request); }
public void TestFrameLayout() { View child; var contentView = new ContentView { Padding = new Thickness(10), Content = child = new View { WidthRequest = 100, HeightRequest = 200, IsPlatformEnabled = true }, IsPlatformEnabled = true, }; Assert.AreEqual(new Size(120, 220), contentView.GetSizeRequest(double.PositiveInfinity, double.PositiveInfinity).Request); contentView.Layout(new Rectangle(0, 0, 300, 300)); Assert.AreEqual(new Rectangle(10, 10, 280, 280), child.Bounds); }
public void TestFrameLayout () { View child; var contentView = new ContentView { Padding = new Thickness (10), Content = child = new View { WidthRequest = 100, HeightRequest = 200, IsPlatformEnabled = true }, IsPlatformEnabled = true, Platform = new UnitPlatform () }; Assert.AreEqual (new Size (120, 220), contentView.GetSizeRequest (double.PositiveInfinity, double.PositiveInfinity).Request); contentView.Layout (new Rectangle (0, 0, 300, 300)); Assert.AreEqual (new Rectangle (10, 10, 280, 280), child.Bounds); }
public void HeightRequest () { View child; var contentView = new ContentView { Padding = new Thickness (10), Content = child = new View { WidthRequest = 100, HeightRequest = 200, IsPlatformEnabled = true, Platform = new UnitPlatform () }, IsPlatformEnabled = true, Platform = new UnitPlatform (), HeightRequest = 20 }; Assert.AreEqual (new Size (120, 40), contentView.GetSizeRequest (double.PositiveInfinity, double.PositiveInfinity).Request); }