示例#1
0
 public override void Setup()
 {
     base.Setup();
     DeviceInfo.SetCurrent(mockDeviceInfo = new MockDeviceInfo());
     MockPlatformSizeService.Current.GetPlatformSizeFunc = (ve, widthConstraint, heightConstraint) =>
     {
         if (widthConstraint < 30)
         {
             return(new SizeRequest(new Size(40, 50)));
         }
         return(new SizeRequest(new Size(20, 100)));
     };
 }
示例#2
0
 public override void Setup()
 {
     base.Setup();
     DeviceDisplay.SetCurrent(mockDeviceDisplay = new MockDeviceDisplay());
     DeviceInfo.SetCurrent(mockDeviceInfo       = new MockDeviceInfo());
 }