Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit e5abea5

Browse files
authored
Merge branch 'master' into fix-9088
2 parents f2820b0 + 3265962 commit e5abea5

File tree

137 files changed

+3036
-750
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+3036
-750
lines changed

.nuspec/Xamarin.Forms.nuspec

Lines changed: 3 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -257,46 +257,10 @@
257257

258258

259259
<!-- VS 2017 needs these-->
260-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.14393\FormsFlyout.xaml" target="lib\uap10.0.14393\Xamarin.Forms.Platform.UAP" />
261-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.14393\FormsProgressBarStyle.xaml" target="lib\uap10.0.14393\Xamarin.Forms.Platform.UAP" />
262-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.14393\FormsTextBoxStyle.xaml" target="lib\uap10.0.14393\Xamarin.Forms.Platform.UAP" />
263-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.14393\MasterDetailControlStyle.xaml" target="lib\uap10.0.14393\Xamarin.Forms.Platform.UAP" />
264-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.14393\PageControlStyle.xaml" target="lib\uap10.0.14393\Xamarin.Forms.Platform.UAP" />
265-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.14393\PickerStyle.xaml" target="lib\uap10.0.14393\Xamarin.Forms.Platform.UAP" />
266-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.14393\Resources.xaml" target="lib\uap10.0.14393\Xamarin.Forms.Platform.UAP" />
267-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.14393\SliderStyle.xaml" target="lib\uap10.0.14393\Xamarin.Forms.Platform.UAP" />
268-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.14393\StepperControl.xaml" target="lib\uap10.0.14393\Xamarin.Forms.Platform.UAP" />
269-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.14393\TabbedPageStyle.xaml" target="lib\uap10.0.14393\Xamarin.Forms.Platform.UAP" />
270-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.14393\CollectionView\ItemsViewStyles.xaml" target="lib\uap10.0.14393\Xamarin.Forms.Platform.UAP\CollectionView" />
271-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.14393\Shell\ShellStyles.xaml" target="lib\uap10.0.14393\Xamarin.Forms.Platform.UAP\Shell" />
272-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.14393\Microsoft.UI.Xaml\DensityStyles\Compact.xaml" target="lib\uap10.0.14393\Xamarin.Forms.Platform.UAP\Microsoft.UI.Xaml\DensityStyles" />
273-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.14393\Microsoft.UI.Xaml\Themes\generic.xaml" target="lib\uap10.0.14393\Xamarin.Forms.Platform.UAP\Microsoft.UI.Xaml\Themes" />
274-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.14393\FormsAutoSuggestBoxStyle.xaml" target="lib\uap10.0.14393\Xamarin.Forms.Platform.UAP" />
275-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.14393\FormsCheckBoxStyle.xaml" target="lib\uap10.0.14393\Xamarin.Forms.Platform.UAP" />
276-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.14393\FormsCommandBarStyle.xaml" target="lib\uap10.0.14393\Xamarin.Forms.Platform.UAP" />
277-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.14393\FormsEmbeddedPageWrapper.xaml" target="lib\uap10.0.14393\Xamarin.Forms.Platform.UAP" />
278-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.14393\PromptDialog.xaml" target="lib\uap10.0.14393\Xamarin.Forms.Platform.UAP" />
279-
260+
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.14393\**\*.xaml" target="lib\uap10.0.14393\Xamarin.Forms.Platform.UAP" />
280261
<!-- VS 2017 needs these 16299-->
281-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.16299\FormsFlyout.xaml" target="lib\uap10.0.16299\Xamarin.Forms.Platform.UAP" />
282-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.16299\FormsProgressBarStyle.xaml" target="lib\uap10.0.16299\Xamarin.Forms.Platform.UAP" />
283-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.16299\FormsTextBoxStyle.xaml" target="lib\uap10.0.16299\Xamarin.Forms.Platform.UAP" />
284-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.16299\MasterDetailControlStyle.xaml" target="lib\uap10.0.16299\Xamarin.Forms.Platform.UAP" />
285-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.16299\PageControlStyle.xaml" target="lib\uap10.0.16299\Xamarin.Forms.Platform.UAP" />
286-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.16299\PickerStyle.xaml" target="lib\uap10.0.16299\Xamarin.Forms.Platform.UAP" />
287-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.16299\Resources.xaml" target="lib\uap10.0.16299\Xamarin.Forms.Platform.UAP" />
288-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.16299\SliderStyle.xaml" target="lib\uap10.0.16299\Xamarin.Forms.Platform.UAP" />
289-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.16299\StepperControl.xaml" target="lib\uap10.0.16299\Xamarin.Forms.Platform.UAP" />
290-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.16299\TabbedPageStyle.xaml" target="lib\uap10.0.16299\Xamarin.Forms.Platform.UAP" />
291-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.16299\CollectionView\ItemsViewStyles.xaml" target="lib\uap10.0.16299\Xamarin.Forms.Platform.UAP\CollectionView" />
292-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.16299\Shell\ShellStyles.xaml" target="lib\uap10.0.16299\Xamarin.Forms.Platform.UAP\Shell" />
293-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.14393\Microsoft.UI.Xaml\DensityStyles\Compact.xaml" target="lib\uap10.0.16299\Xamarin.Forms.Platform.UAP\Microsoft.UI.Xaml\DensityStyles" />
294-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.14393\Microsoft.UI.Xaml\Themes\generic.xaml" target="lib\uap10.0.16299\Xamarin.Forms.Platform.UAP\Microsoft.UI.Xaml\Themes" />
295-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.16299\FormsAutoSuggestBoxStyle.xaml" target="lib\uap10.0.16299\Xamarin.Forms.Platform.UAP" />
296-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.16299\FormsCheckBoxStyle.xaml" target="lib\uap10.0.16299\Xamarin.Forms.Platform.UAP" />
297-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.16299\FormsCommandBarStyle.xaml" target="lib\uap10.0.16299\Xamarin.Forms.Platform.UAP" />
298-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.16299\FormsEmbeddedPageWrapper.xaml" target="lib\uap10.0.16299\Xamarin.Forms.Platform.UAP" />
299-
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.16299\PromptDialog.xaml" target="lib\uap10.0.16299\Xamarin.Forms.Platform.UAP" />
262+
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.16299\**\*.xaml" target="lib\uap10.0.16299\Xamarin.Forms.Platform.UAP" />
263+
<file src="..\Xamarin.Forms.Platform.UAP\obj\$Configuration$\uap10.0.14393\Microsoft.UI.Xaml\**\*.xaml" target="lib\uap10.0.16299\Xamarin.Forms.Platform.UAP\Microsoft.UI.Xaml" />
300264

301265
<!--Mac-->
302266
<file src="..\Xamarin.Forms.Core\bin\$Configuration$\netstandard2.0\Xamarin.Forms.Core.dll" target="lib\Xamarin.Mac" />

Xamarin.Forms.Build.Tasks/XamlTask.cs

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -78,22 +78,19 @@ public static bool IsXaml(this EmbeddedResource resource, ModuleDefinition modul
7878
if (!resource.Name.EndsWith(".xaml", StringComparison.InvariantCulture))
7979
return false;
8080

81-
using (var resourceStream = resource.GetResourceStream()) {
82-
var xmlDoc = new XmlDocument();
83-
xmlDoc.Load(resourceStream);
81+
using (var resourceStream = resource.GetResourceStream())
82+
using (var reader = XmlReader.Create(resourceStream))
83+
{
84+
// Read to the first Element
85+
while (reader.Read() && reader.NodeType != XmlNodeType.Element) ;
8486

85-
var nsmgr = new XmlNamespaceManager(xmlDoc.NameTable);
86-
87-
var root = xmlDoc.SelectSingleNode("/*", nsmgr);
88-
if (root == null)
87+
if (reader.NodeType != XmlNodeType.Element)
8988
return false;
9089

91-
var rootClass = root.Attributes["Class", XamlParser.X2006Uri] ??
92-
root.Attributes["Class", XamlParser.X2009Uri];
93-
if (rootClass != null) {
94-
classname = rootClass.Value;
90+
classname = reader.GetAttribute("Class", XamlParser.X2009Uri) ??
91+
reader.GetAttribute("Class", XamlParser.X2006Uri);
92+
if (classname != null)
9593
return true;
96-
}
9794

9895
//no x:Class, but it might be a RD without x:Class and with <?xaml-comp compile="true" ?>
9996
//in that case, it has a XamlResourceIdAttribute

Xamarin.Forms.ControlGallery.Android/FormsAppCompatActivity.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,14 @@ protected override void OnCreate(Bundle bundle)
9696
});
9797

9898
LoadApplication(_app);
99-
if (Forms.Flags.Contains("FastRenderers_Experimental"))
99+
100+
#if !TEST_EXPERIMENTAL_RENDERERS
101+
if ((int)Build.VERSION.SdkInt >= 21)
100102
{
101-
var masterPage = ((_app.MainPage as MasterDetailPage)?.Master as ContentPage);
102-
if (masterPage != null)
103-
masterPage.Content = new Label { Text = "Fast Renderers" };
103+
// Show a purple status bar if we're looking at legacy renderers
104+
Window.SetStatusBarColor(Color.MediumPurple.ToAndroid());
104105
}
106+
#endif
105107
}
106108

107109
protected override void OnResume()

Xamarin.Forms.ControlGallery.Android/LinkDescription.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,9 @@
99
<namespace fullname="Xamarin.Forms.Controls.Tests" />
1010
</assembly>
1111
<assembly fullname="nunit.framework"/>
12+
<assembly fullname="mscorlib">
13+
<!-- If we don't preserve these, we can't run async unit tests on the platform -->
14+
<type fullname="System.Runtime.CompilerServices.INotifyCompletion" />
15+
<type fullname="System.Runtime.CompilerServices.TaskAwaiter" />
16+
</assembly>
1217
</linker>
Lines changed: 19 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
using System;
2-
using System.Collections;
3-
using System.Collections.Generic;
4-
using System.IO;
1+
using System.Collections;
52
using System.Linq;
6-
using System.Text;
3+
using System.Threading.Tasks;
74
using Android.Graphics.Drawables;
85
using NUnit.Framework;
96
using NUnit.Framework.Internal;
@@ -31,7 +28,7 @@ static IEnumerable TestCases
3128

3229
[Test, Category("BackgroundColor"), Category("Button")]
3330
[Description("Button background color should match renderer background color")]
34-
public void ButtonBackgroundColorConsistent()
31+
public async Task ButtonBackgroundColorConsistent()
3532
{
3633
var button = new Button
3734
{
@@ -40,17 +37,14 @@ public void ButtonBackgroundColorConsistent()
4037
BackgroundColor = Color.AliceBlue
4138
};
4239

43-
using (var nativeButton = GetNativeControl(button))
44-
{
45-
var expectedColor = button.BackgroundColor.ToAndroid();
46-
Layout(button, nativeButton);
47-
nativeButton.AssertColorAtCenter(expectedColor);
48-
}
40+
var expectedColor = button.BackgroundColor.ToAndroid();
41+
var screenshot = await GetControlProperty(button, abutton => abutton.ToBitmap(), requiresLayout: true);
42+
screenshot.AssertColorAtCenter(expectedColor);
4943
}
5044

5145
[Test, Category("BackgroundColor"), Category("Button")]
5246
[Description("ImageButton background color should match renderer background color")]
53-
public void ImageButtonBackgroundColorConsistent()
47+
public async Task ImageButtonBackgroundColorConsistent()
5448
{
5549
var button = new ImageButton
5650
{
@@ -59,17 +53,14 @@ public void ImageButtonBackgroundColorConsistent()
5953
BackgroundColor = Color.AliceBlue
6054
};
6155

62-
using (var nativeButton = GetNativeControl(button))
63-
{
64-
var expectedColor = button.BackgroundColor.ToAndroid();
65-
Layout(button, nativeButton);
66-
nativeButton.AssertColorAtCenter(expectedColor);
67-
}
56+
var expectedColor = button.BackgroundColor.ToAndroid();
57+
var screenshot = await GetControlProperty(button, abutton => abutton.ToBitmap(), requiresLayout: true);
58+
screenshot.AssertColorAtCenter(expectedColor);
6859
}
6960

7061
[Test, Category("BackgroundColor")]
7162
[Description("Frame background color should match renderer background color")]
72-
public void FrameBackgroundColorConsistent()
63+
public async Task FrameBackgroundColorConsistent()
7364
{
7465
var frame = new Frame
7566
{
@@ -78,27 +69,19 @@ public void FrameBackgroundColorConsistent()
7869
BackgroundColor = Color.AliceBlue
7970
};
8071

81-
using (var renderer = GetRenderer(frame))
82-
{
83-
var expectedColor = frame.BackgroundColor.ToAndroid();
84-
var view = renderer.View;
85-
Layout(frame, view);
86-
view.AssertColorAtCenter(expectedColor);
87-
}
72+
var expectedColor = frame.BackgroundColor.ToAndroid();
73+
74+
var screenshot = await GetRendererProperty(frame, ver => ver.View.ToBitmap(), requiresLayout: true);
75+
screenshot.AssertColorAtCenter(expectedColor);
8876
}
8977

9078
[Test, Category("BackgroundColor"), TestCaseSource(nameof(TestCases))]
9179
[Description("VisualElement background color should match renderer background color")]
92-
public void BackgroundColorConsistent(VisualElement element)
80+
public async Task BackgroundColorConsistent(VisualElement element)
9381
{
94-
using (var renderer = GetRenderer(element))
95-
{
96-
var expectedColor = element.BackgroundColor.ToAndroid();
97-
var view = renderer.View;
98-
var colorDrawable = view.Background as ColorDrawable;
99-
var nativeColor = colorDrawable.Color;
100-
Assert.That(nativeColor, Is.EqualTo(expectedColor));
101-
}
82+
var expectedColor = element.BackgroundColor.ToAndroid();
83+
var nativeColor = await GetRendererProperty(element, ver => (ver.View.Background as ColorDrawable)?.Color);
84+
Assert.That(nativeColor, Is.EqualTo(expectedColor));
10285
}
10386
}
10487
}

Xamarin.Forms.ControlGallery.Android/Tests/CollectionViewTests.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using NUnit.Framework;
1+
using System.Threading.Tasks;
2+
using NUnit.Framework;
23
using NUnit.Framework.Internal;
34
using Xamarin.Forms.CustomAttributes;
45

@@ -8,7 +9,7 @@ public class CollectionViewTests : PlatformTestFixture
89
{
910
[Issue(IssueTracker.Github, 9030, "[Bug] ClassNotFoundException when using snap points on API < 23")]
1011
[Test(Description = "CollectionView with SnapPointsType set should not crash")]
11-
public void SnapPointsDoNotCrashOnOlderAPIs()
12+
public async Task SnapPointsDoNotCrashOnOlderAPIs()
1213
{
1314
var cv = new CollectionView();
1415

@@ -19,7 +20,7 @@ public void SnapPointsDoNotCrashOnOlderAPIs()
1920
cv.ItemsLayout = itemsLayout;
2021

2122
// Creating the renderer is enough to cause the ClassNotFoundException on older APIs
22-
GetRenderer(cv).Dispose();
23+
await Device.InvokeOnMainThreadAsync(() => { GetRenderer(cv).Dispose(); });
2324
}
2425
}
2526
}
Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using NUnit.Framework;
1+
using System.Threading.Tasks;
2+
using NUnit.Framework;
23
using NUnit.Framework.Internal;
34
using Xamarin.Forms.CustomAttributes;
45
using Xamarin.Forms.Platform.Android;
@@ -9,7 +10,7 @@ namespace Xamarin.Forms.ControlGallery.Android.Tests
910
public class CornerRadiusTests : PlatformTestFixture
1011
{
1112
[Test, Category("CornerRadius"), Category("BoxView")]
12-
public void BoxviewCornerRadius()
13+
public async Task BoxviewCornerRadius()
1314
{
1415
var boxView = new BoxView
1516
{
@@ -19,11 +20,11 @@ public void BoxviewCornerRadius()
1920
BackgroundColor = Color.Red
2021
};
2122

22-
CheckCornerRadius(boxView);
23+
await CheckCornerRadius(boxView);
2324
}
24-
25+
2526
[Test, Category("CornerRadius"), Category("Button")]
26-
public void ButtonCornerRadius()
27+
public async Task ButtonCornerRadius()
2728
{
2829
var backgroundColor = Color.Red;
2930

@@ -35,11 +36,11 @@ public void ButtonCornerRadius()
3536
BackgroundColor = backgroundColor
3637
};
3738

38-
CheckCornerRadius(button);
39+
await CheckCornerRadius(button);
3940
}
4041

4142
[Test, Category("CornerRadius"), Category("Frame")]
42-
public void FrameCornerRadius()
43+
public async Task FrameCornerRadius()
4344
{
4445
var backgroundColor = Color.Red;
4546

@@ -51,11 +52,11 @@ public void FrameCornerRadius()
5152
BackgroundColor = backgroundColor
5253
};
5354

54-
CheckCornerRadius(frame);
55+
await CheckCornerRadius(frame);
5556
}
5657

5758
[Test, Category("CornerRadius"), Category("ImageButton")]
58-
public void ImageButtonCornerRadius()
59+
public async Task ImageButtonCornerRadius()
5960
{
6061
var backgroundColor = Color.Red;
6162

@@ -69,28 +70,33 @@ public void ImageButtonCornerRadius()
6970
BorderWidth = 2
7071
};
7172

72-
CheckCornerRadius(button);
73+
await CheckCornerRadius(button);
7374
}
7475

75-
public void CheckCornerRadius(VisualElement visualElement)
76+
public async Task CheckCornerRadius(VisualElement visualElement)
7677
{
77-
using (var renderer = GetRenderer(visualElement))
78-
{
79-
var view = renderer.View;
80-
Layout(visualElement, view);
78+
var screenshot = await Device.InvokeOnMainThreadAsync(() => {
79+
80+
using (var renderer = GetRenderer(visualElement))
81+
{
82+
var view = renderer.View;
83+
Layout(visualElement, view);
8184

82-
// Need to parent the Frame for it to work on lower APIs (below Marshmallow)
83-
ParentView(view);
85+
// Need to parent the Frame for it to work on lower APIs (below Marshmallow)
86+
ParentView(view);
87+
var image = view.ToBitmap();
88+
UnparentView(view);
8489

85-
// The corners should show the background color
86-
view.AssertColorAtTopLeft(EmptyBackground)
87-
.AssertColorAtTopRight(EmptyBackground)
88-
.AssertColorAtBottomLeft(EmptyBackground)
89-
.AssertColorAtBottomRight(EmptyBackground)
90-
.AssertColorAtCenter(visualElement.BackgroundColor.ToAndroid());
90+
return image;
91+
}
92+
});
9193

92-
UnparentView(view);
93-
}
94+
// The corners should show the background color
95+
screenshot.AssertColorAtTopLeft(EmptyBackground)
96+
.AssertColorAtTopRight(EmptyBackground)
97+
.AssertColorAtBottomLeft(EmptyBackground)
98+
.AssertColorAtBottomRight(EmptyBackground)
99+
.AssertColorAtCenter(visualElement.BackgroundColor.ToAndroid());
94100
}
95101
}
96102
}

Xamarin.Forms.ControlGallery.Android/Tests/IsEnabledTests.cs

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.Collections;
2+
using System.Threading.Tasks;
23
using NUnit.Framework;
34
using NUnit.Framework.Internal;
45
using Xamarin.Forms.CustomAttributes;
@@ -32,24 +33,26 @@ static IEnumerable TestCases
3233

3334
[Test, Category("IsEnabled"), TestCaseSource(nameof(TestCases))]
3435
[Description("VisualElement enabled should match renderer enabled")]
35-
public void EnabledConsistent(VisualElement element)
36+
public async Task EnabledConsistent(VisualElement element)
3637
{
37-
using (var renderer = GetRenderer(element))
38-
{
39-
var expected = element.IsEnabled;
40-
var nativeView = renderer.View;
38+
await Device.InvokeOnMainThreadAsync(() => {
39+
using (var renderer = GetRenderer(element))
40+
{
41+
var expected = element.IsEnabled;
42+
var nativeView = renderer.View;
4143

42-
ParentView(nativeView);
44+
ParentView(nativeView);
4345

44-
// Check the container control
45-
Assert.That(renderer.View.Enabled, Is.EqualTo(expected));
46+
// Check the container control
47+
Assert.That(renderer.View.Enabled, Is.EqualTo(expected));
4648

47-
// Check the actual control
48-
var control = GetNativeControl(element);
49-
Assert.That(control.Enabled, Is.EqualTo(expected));
49+
// Check the actual control
50+
var control = GetNativeControl(element);
51+
Assert.That(control.Enabled, Is.EqualTo(expected));
5052

51-
UnparentView(nativeView);
52-
}
53+
UnparentView(nativeView);
54+
}
55+
});
5356
}
5457
}
5558
}

0 commit comments

Comments
 (0)