[Core,iOS,Android] Remove experimental flags Carousel, Swipe, Shapes, Brush (#12068)

* [Core,iOS,Android] Remove experimental flags Carrousel,Swipe,Shapes,Brush,DragAndDrop

* [Controls]Remove set some experimental flags
This commit is contained in:
Rui Marinho 2020-09-10 12:59:32 +01:00 коммит произвёл GitHub
Родитель e57d160016
Коммит 1882b5d59d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
85 изменённых файлов: 11 добавлений и 280 удалений

Просмотреть файл

@ -45,7 +45,7 @@ namespace Xamarin.Forms.ControlGallery.Android
#if TEST_EXPERIMENTAL_RENDERERS
#else
Forms.SetFlags("UseLegacyRenderers", "SwipeView_Experimental");
Forms.SetFlags("UseLegacyRenderers");
#endif
Forms.Init(this, bundle);

Просмотреть файл

@ -21,7 +21,6 @@ namespace Xamarin.Forms.ControlGallery.GTK
GtkOpenGL.Init();
GtkThemes.Init();
Gtk.Application.Init();
Forms.SetFlags("CarouselView_Experimental");
FormsMaps.Init(string.Empty);
Forms.Init();
var app = new App();

Просмотреть файл

@ -10,10 +10,9 @@ namespace Xamarin.Forms.ControlGallery.WPF
public MainWindow()
{
InitializeComponent();
Forms.SetFlags("CarouselView_Experimental", "RadioButton_Experimental");
Xamarin.Forms.Forms.Init();
FormsMaps.Init("");
LoadApplication(new Controls.App());
}
}
}
}

Просмотреть файл

@ -71,7 +71,8 @@ namespace Xamarin.Forms.ControlGallery.WindowsUniversal
rootFrame.NavigationFailed += OnNavigationFailed;
Forms.SetFlags("Shell_UWP_Experimental", "SwipeView_Experimental");
Forms.SetFlags("Shell_UWP_Experimental");
Forms.Init (e);
//FormsMaps.Init (Controls.App.Config["UWPMapsAuthKey"]);

Просмотреть файл

@ -151,7 +151,7 @@ namespace Xamarin.Forms.ControlGallery.iOS
App.IOSVersion = int.Parse(versionPart[0]);
Xamarin.Calabash.Start();
Forms.SetFlags("SwipeView_Experimental");
Forms.Init();
FormsMaps.Init();
FormsMaterial.Init();

Просмотреть файл

@ -101,9 +101,6 @@ namespace Xamarin.Forms.Controls.Issues
protected override void Init()
{
#if APP
Device.SetFlags(new List<string>(Device.Flags ?? new List<string>()) { "SwipeView_Experimental" });
#endif
}
}

Просмотреть файл

@ -18,7 +18,6 @@ namespace Xamarin.Forms.Controls.Issues
public Issue10679()
{
#if APP
Device.SetFlags(new List<string>(Device.Flags ?? new List<string>()) { "SwipeView_Experimental" });
InitializeComponent();
#endif
}

Просмотреть файл

@ -22,7 +22,6 @@ namespace Xamarin.Forms.Controls.Issues
public Issue10875()
{
#if APP
Device.SetFlags(new List<string>(Device.Flags ?? new List<string>()) { "SwipeView_Experimental" });
InitializeComponent();
BindingContext = new Issue10875ViewModel();
#endif

Просмотреть файл

@ -21,9 +21,6 @@ namespace Xamarin.Forms.Controls.Issues
{
public Issue10940()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.SwipeViewExperimental });
#endif
}
protected override void Init()

Просмотреть файл

@ -21,8 +21,7 @@ namespace Xamarin.Forms.Controls.Issues
public Issue11050()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.ShapesExperimental });
InitializeComponent();
Device.StartTimer(TimeSpan.FromMilliseconds(15), () =>

Просмотреть файл

@ -20,7 +20,6 @@ namespace Xamarin.Forms.Controls
public Issue11113()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.ShapesExperimental });
InitializeComponent();
#endif
}

Просмотреть файл

@ -22,8 +22,6 @@ namespace Xamarin.Forms.Controls.Issues
{
protected override void Init()
{
Device.SetFlags(new List<string> { ExperimentalFlags.ShapesExperimental });
Title = "Issue 11137";
var grid = new Grid();

Просмотреть файл

@ -23,7 +23,6 @@ namespace Xamarin.Forms.Controls.Issues
public Issue11190()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.ShapesExperimental });
InitializeComponent();
#endif
}

Просмотреть файл

@ -30,7 +30,6 @@ namespace Xamarin.Forms.Controls.Issues
public Issue11209()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.SwipeViewExperimental });
InitializeComponent();
#endif
}

Просмотреть файл

@ -23,9 +23,6 @@ namespace Xamarin.Forms.Controls.Issues
{
public Issue11251()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.SwipeViewExperimental });
#endif
}
public ICommand ExecuteMe = new Command(() =>

Просмотреть файл

@ -22,7 +22,6 @@ namespace Xamarin.Forms.Controls.Issues
public Issue11262()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.SwipeViewExperimental });
InitializeComponent();
#endif
}

Просмотреть файл

@ -21,9 +21,6 @@ namespace Xamarin.Forms.Controls.Issues
{
public Issue11286()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.SwipeViewExperimental });
#endif
}
protected override void Init()

Просмотреть файл

@ -23,9 +23,6 @@ namespace Xamarin.Forms.Controls.Issues
{
public Issue11314()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.SwipeViewExperimental });
#endif
}
protected override void Init()

Просмотреть файл

@ -23,7 +23,6 @@ namespace Xamarin.Forms.Controls.Issues
public Issue11333()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.SwipeViewExperimental });
InitializeComponent();
#endif
}

Просмотреть файл

@ -21,8 +21,6 @@ namespace Xamarin.Forms.Controls.Issues
public Issue11374()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.SwipeViewExperimental });
InitializeComponent();
#endif
}

Просмотреть файл

@ -17,7 +17,6 @@ namespace Xamarin.Forms.Controls.Issues
public Issue11413()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.ShapesExperimental });
InitializeComponent();
#endif
}

Просмотреть файл

@ -28,7 +28,6 @@ namespace Xamarin.Forms.Controls.Issues
{
#if APP
Title = "Issue 11496";
Device.SetFlags(new List<string> { ExperimentalFlags.SwipeViewExperimental });
InitializeComponent();
#endif
}

Просмотреть файл

@ -26,7 +26,6 @@ namespace Xamarin.Forms.Controls.Issues
{
#if APP
Title = "Issue 11547";
Device.SetFlags(new List<string> { ExperimentalFlags.ShapesExperimental });
InitializeComponent();
#endif
}

Просмотреть файл

@ -22,9 +22,6 @@ namespace Xamarin.Forms.Controls.Issues
{
public Issue11563()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.BrushExperimental, ExperimentalFlags.ShapesExperimental });
#endif
}
protected override void Init()

Просмотреть файл

@ -22,8 +22,6 @@ namespace Xamarin.Forms.Controls.Issues
public Issue11573()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.BrushExperimental });
InitializeComponent();
#endif
}

Просмотреть файл

@ -23,7 +23,6 @@ namespace Xamarin.Forms.Controls.Issues
public Issue11653()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.BrushExperimental, ExperimentalFlags.ShapesExperimental });
InitializeComponent();
#endif
}

Просмотреть файл

@ -30,7 +30,6 @@ namespace Xamarin.Forms.Controls.Issues
{
#if APP
Title = "Issue 11737";
Device.SetFlags(new List<string> { ExperimentalFlags.SwipeViewExperimental });
InitializeComponent();
BindingContext = new Issue11737ViewModel();
#endif

Просмотреть файл

@ -31,7 +31,6 @@ namespace Xamarin.Forms.Controls.Issues
{
#if APP
Title = "Issue 11764";
Device.SetFlags(new List<string> { ExperimentalFlags.SwipeViewExperimental });
InitializeComponent();
var random = new Random();

Просмотреть файл

@ -22,9 +22,6 @@ namespace Xamarin.Forms.Controls.Issues
{
public Issue11858()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.ShapesExperimental });
#endif
}
protected override void Init()

Просмотреть файл

@ -23,7 +23,6 @@ namespace Xamarin.Forms.Controls.Issues
public Issue7678Ios()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.CarouselViewExperimental });
Title = "Issue 7678";
BindingContext = new Issue7678IosViewModel();
#endif
@ -149,7 +148,6 @@ namespace Xamarin.Forms.Controls.Issues
public Issue7678Droid()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.CarouselViewExperimental });
Title = "Issue 7678";
BindingContext = new Issue7678DroidViewModel();
#endif

Просмотреть файл

@ -29,7 +29,6 @@ namespace Xamarin.Forms.Controls.Issues
public Issue7817()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.CarouselViewExperimental });
Title = "Issue 7817";
InitializeComponent();
#endif

Просмотреть файл

@ -28,7 +28,6 @@ namespace Xamarin.Forms.Controls.Issues
public Issue7924()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.CarouselViewExperimental });
Title = "Issue 7924";
InitializeComponent();
#endif

Просмотреть файл

@ -19,7 +19,6 @@ namespace Xamarin.Forms.Controls.Issues
public Issue8417()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.CarouselViewExperimental });
InitializeComponent();
BindingContext = new Issue8417ViewModel();
#endif

Просмотреть файл

@ -21,7 +21,6 @@ namespace Xamarin.Forms.Controls.Issues
public Issue8767()
{
#if APP
Device.SetFlags(new[] { ExperimentalFlags.SwipeViewExperimental });
this.InitializeComponent();
#endif
}

Просмотреть файл

@ -25,7 +25,6 @@ namespace Xamarin.Forms.Controls.Issues
public Issue8778()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.SwipeViewExperimental });
InitializeComponent();
#endif
}

Просмотреть файл

@ -26,7 +26,6 @@ namespace Xamarin.Forms.Controls.Issues
public Issue8781()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.SwipeViewExperimental });
InitializeComponent();
BindingContext = this;
#endif

Просмотреть файл

@ -26,7 +26,6 @@ namespace Xamarin.Forms.Controls.Issues
public Issue8782()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.SwipeViewExperimental });
Title = "Issue 8782";
InitializeComponent();
#endif

Просмотреть файл

@ -35,8 +35,6 @@ namespace Xamarin.Forms.Controls.Issues
protected override void Init()
{
Device.SetFlags(new List<string> { ExperimentalFlags.SwipeViewExperimental });
_rightSwipeCountLabel = new Label
{
AutomationId = RightCountLabelId,

Просмотреть файл

@ -15,7 +15,6 @@ namespace Xamarin.Forms.Controls.Issues
public Issue9305()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.SwipeViewExperimental });
Title = "Issue 9305";
InitializeComponent();
#endif

Просмотреть файл

@ -28,8 +28,6 @@ namespace Xamarin.Forms.Controls.Issues
protected override void Init()
{
Device.SetFlags(new List<string> { ExperimentalFlags.SwipeViewExperimental });
Title = PageTitle;
_leftSwipeCountLabel = new Label

Просмотреть файл

@ -18,12 +18,8 @@ namespace Xamarin.Forms.Controls.Issues
InitializeComponent();
#endif
}
protected override void Init()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.SwipeViewExperimental });
#endif
}
}
}

Просмотреть файл

@ -16,7 +16,6 @@ namespace Xamarin.Forms.Controls.Issues
public Issue9646()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.SwipeViewExperimental });
InitializeComponent();
#endif
}

Просмотреть файл

@ -24,7 +24,6 @@ namespace Xamarin.Forms.Controls.Issues
public Issue9734()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.SwipeViewExperimental });
InitializeComponent();
BindingContext = new Issue9734ViewModel();
#endif

Просмотреть файл

@ -16,7 +16,6 @@ namespace Xamarin.Forms.Controls.Issues
public Issue9735()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.SwipeViewExperimental });
InitializeComponent();
#endif
}

Просмотреть файл

@ -31,7 +31,6 @@ namespace Xamarin.Forms.Controls.Issues
public Issue9827()
{
#if APP
Device.SetFlags(new List<string>(Device.Flags ?? new List<string>()) { ExperimentalFlags.CarouselViewExperimental });
InitializeComponent();
#endif
}

Просмотреть файл

@ -19,7 +19,6 @@ namespace Xamarin.Forms.Controls.Issues
public VisualControlsPage()
{
#if APP
Device.SetFlags(new List<string> { ExperimentalFlags.BrushExperimental, ExperimentalFlags.ShapesExperimental });
InitializeComponent();
#endif
}

Просмотреть файл

@ -21,8 +21,6 @@ namespace Xamarin.Forms.Controls
internal CoreGalleryPage()
{
Device.SetFlags(new[] { ExperimentalFlags.BrushExperimental });
Layout = new StackLayout
{
Padding = new Thickness(20)

Просмотреть файл

@ -12,13 +12,6 @@ namespace Xamarin.Forms.Controls.GalleryPages.CollectionViewGalleries.CarouselVi
Title = "CarouselView Galleries";
var button = new Button
{
Text = "Enable IndicatorView",
AutomationId = "EnableIndicatorView"
};
button.Clicked += ButtonClicked;
Content = new ScrollView
{
Content = new StackLayout
@ -26,7 +19,6 @@ namespace Xamarin.Forms.Controls.GalleryPages.CollectionViewGalleries.CarouselVi
Children =
{
descriptionLabel,
button,
GalleryBuilder.NavButton("CarouselView (Code, Horizontal)", () =>
new CarouselCodeGallery(ItemsLayoutOrientation.Horizontal), Navigation),
GalleryBuilder.NavButton("CarouselView (Code, Vertical)", () =>
@ -59,16 +51,5 @@ namespace Xamarin.Forms.Controls.GalleryPages.CollectionViewGalleries.CarouselVi
}
};
}
void ButtonClicked(object sender, System.EventArgs e)
{
var button = sender as Button;
button.Text = "IndicatorView Enabled!";
button.TextColor = Color.Black;
button.IsEnabled = false;
Device.SetFlags(new[] { ExperimentalFlags.CarouselViewExperimental });
}
}
}

Просмотреть файл

@ -8,7 +8,6 @@ namespace Xamarin.Forms.Controls.GalleryPages.DragAndDropGalleries
{
public DragAndDropGallery()
{
Device.SetFlags(new List<string> { ExperimentalFlags.DragAndDropExperimental, ExperimentalFlags.ShellUWPExperimental, ExperimentalFlags.ShapesExperimental });
Items.Add(new EnablingAndDisablingGestureTests());
Items.Add(new VariousDragAndDropPermutations());
Items.Add(new DragAndDropBetweenLayouts());

Просмотреть файл

@ -9,13 +9,6 @@
var descriptionLabel =
new Label { Text = "Brushes Galleries", Margin = new Thickness(2, 2, 2, 2) };
var button = new Button
{
Text = "Enable Brushes",
AutomationId = "EnableBrushes"
};
button.Clicked += ButtonClicked;
var navigationBarButton = new Button
{
FontSize = 10,
@ -45,7 +38,6 @@
Children =
{
descriptionLabel,
button,
GalleryBuilder.NavButton("Gradient Views", () =>
new GradientViewsGallery(), Navigation),
GalleryBuilder.NavButton("SolidColorBrush Converter Gallery", () =>
@ -84,16 +76,5 @@
Content = layout
};
}
void ButtonClicked(object sender, System.EventArgs e)
{
var button = sender as Button;
button.Text = "Brushes Enabled!";
button.TextColor = Color.Black;
button.IsEnabled = false;
Device.SetFlags(new[] { ExperimentalFlags.BrushExperimental, ExperimentalFlags.ShapesExperimental, ExperimentalFlags.SwipeViewExperimental });
}
}
}

Просмотреть файл

@ -12,18 +12,10 @@ namespace Xamarin.Forms.Controls.GalleryPages.RefreshViewGalleries
{
Title = "RefreshView Gallery";
var button = new Button
{
Text = "Enable CarouselView",
AutomationId = "EnableCarouselView"
};
button.Clicked += ButtonClicked;
Content = new StackLayout
{
Children =
{
button,
GalleryBuilder.NavButton("Refresh Layout Gallery", () => new RefreshLayoutGallery(), Navigation),
GalleryBuilder.NavButton("RefreshView using margins Gallery", () => new RefreshLayoutMarginGallery(), Navigation),
GalleryBuilder.NavButton("Refresh ScrollView Gallery", () => new RefreshScrollViewGallery(), Navigation),
@ -35,17 +27,6 @@ namespace Xamarin.Forms.Controls.GalleryPages.RefreshViewGalleries
}
};
}
void ButtonClicked(object sender, System.EventArgs e)
{
var button = sender as Button;
button.Text = "CarouselView Enabled!";
button.TextColor = Color.Black;
button.IsEnabled = false;
Device.SetFlags(new[] { ExperimentalFlags.CarouselViewExperimental });
}
}
[Preserve(AllMembers = true)]

Просмотреть файл

@ -53,8 +53,6 @@ namespace Xamarin.Forms.Controls.GalleryPages.ShapesGalleries
button.Text = "Shapes Enabled!";
button.TextColor = Color.Black;
button.IsEnabled = false;
Device.SetFlags(new[] { ExperimentalFlags.ShapesExperimental, ExperimentalFlags.BrushExperimental });
}
}
}

Просмотреть файл

@ -7,21 +7,13 @@ namespace Xamarin.Forms.Controls.GalleryPages.SwipeViewGalleries
{
public SwipeViewGallery()
{
var button = new Button
{
Text = "Enable SwipeView",
AutomationId = "EnableSwipeView"
};
button.Clicked += ButtonClicked;
Content = new ScrollView
{
Content = new StackLayout
{
Children =
{
button,
GalleryBuilder.NavButton("Basic SwipeView Gallery", () => new BasicSwipeGallery(), Navigation),
GalleryBuilder.NavButton("Basic SwipeView Gallery", () => new BasicSwipeGallery(), Navigation),
GalleryBuilder.NavButton("SwipeView Events Gallery", () => new SwipeViewEventsGallery(), Navigation),
GalleryBuilder.NavButton("SwipeItems from Resource Gallery", () => new ResourceSwipeItemsGallery(), Navigation),
GalleryBuilder.NavButton("BindableLayout Gallery", () => new SwipeBindableLayoutGallery(), Navigation),
@ -46,16 +38,5 @@ namespace Xamarin.Forms.Controls.GalleryPages.SwipeViewGalleries
}
};
}
void ButtonClicked(object sender, System.EventArgs e)
{
var button = sender as Button;
button.Text = "SwipeView Enabled!";
button.TextColor = Color.Black;
button.IsEnabled = false;
Device.SetFlags(new[] { ExperimentalFlags.SwipeViewExperimental, ExperimentalFlags.CarouselViewExperimental });
}
}
}

Просмотреть файл

@ -12,7 +12,7 @@ namespace Xamarin.Forms.Controls.XamStore
{
InitializeComponent();
Device.SetFlags(new List<string> { ExperimentalFlags.BrushExperimental, ExperimentalFlags.ShellUWPExperimental });
Device.SetFlags(new List<string> { ExperimentalFlags.ShellUWPExperimental });
CurrentItem = _storeItem;
}

Просмотреть файл

@ -288,17 +288,8 @@ namespace Xamarin.Forms.Core.UITests
void VisitSubGallery(string galleryName, bool enableIndicator = false)
{
var result = App.Query(c => c.Marked("EnableIndicatorView"));
if (result.Length == 0)
{
App.ScrollUp();
App.ScrollUp();
}
if (enableIndicator)
App.Tap(t => t.Marked("EnableIndicatorView"));
App.ScrollUp();
App.ScrollUp();
App.QueryUntilPresent(() =>
{

Просмотреть файл

@ -11,8 +11,6 @@ namespace Xamarin.Forms.Core.UnitTests
public void SetUp()
{
_converter = new BrushTypeConverter();
Device.SetFlags(new[] { ExperimentalFlags.BrushExperimental });
}
[Test]

Просмотреть файл

@ -12,7 +12,6 @@ namespace Xamarin.Forms.Core.UnitTests
[SetUp]
public override void Setup()
{
Device.SetFlags(new List<string> { ExperimentalFlags.CarouselViewExperimental });
base.Setup();
var mockDeviceInfo = new TestDeviceInfo();
Device.Info = mockDeviceInfo;

Просмотреть файл

@ -15,7 +15,6 @@ namespace Xamarin.Forms.Core.UnitTests
{
base.Setup();
Device.PlatformServices = new MockPlatformServices();
Device.SetFlags(new[] { ExperimentalFlags.DragAndDropExperimental });
}
[TearDown]

Просмотреть файл

@ -15,7 +15,6 @@ namespace Xamarin.Forms.Core.UnitTests
{
base.Setup();
Device.PlatformServices = new MockPlatformServices();
Device.SetFlags(new[] { ExperimentalFlags.DragAndDropExperimental });
}
[TearDown]

Просмотреть файл

@ -7,14 +7,6 @@ namespace Xamarin.Forms.Core.UnitTests
[TestFixture]
public class GeometryTests : BaseTestFixture
{
[SetUp]
public override void Setup()
{
base.Setup();
Device.SetFlags(new[] { ExperimentalFlags.ShapesExperimental });
}
[TestCase(0, true)]
[TestCase(0, false)]
[TestCase(45, true)]

Просмотреть файл

@ -10,7 +10,6 @@ namespace Xamarin.Forms.Core.UnitTests
[SetUp]
public override void Setup()
{
Device.SetFlags(new List<string> { ExperimentalFlags.CarouselViewExperimental });
base.Setup();
var mockDeviceInfo = new TestDeviceInfo();
Device.Info = mockDeviceInfo;

Просмотреть файл

@ -5,14 +5,6 @@ namespace Xamarin.Forms.Core.UnitTests
{
public class LineTests : BaseTestFixture
{
[SetUp]
public override void Setup()
{
base.Setup();
Device.SetFlags(new[] { ExperimentalFlags.ShapesExperimental });
}
[Test]
public void XPointCanBeSetFromStyle()
{

Просмотреть файл

@ -8,8 +8,6 @@ namespace Xamarin.Forms.Core.UnitTests
public override void Setup()
{
base.Setup();
Device.SetFlags(new[] { ExperimentalFlags.BrushExperimental });
}
[Test]

Просмотреть файл

@ -12,8 +12,6 @@ namespace Xamarin.Forms.Core.UnitTests
{
base.Setup();
Device.SetFlags(new[] { ExperimentalFlags.ShapesExperimental });
_pointCollectionConverter = new PointCollectionConverter();
}

Просмотреть файл

@ -12,8 +12,6 @@ namespace Xamarin.Forms.Core.UnitTests
{
base.Setup();
Device.SetFlags(new[] { ExperimentalFlags.ShapesExperimental });
_pointCollectionConverter = new PointCollectionConverter();
}

Просмотреть файл

@ -12,8 +12,6 @@ namespace Xamarin.Forms.Core.UnitTests
{
base.Setup();
Device.SetFlags(new[] { ExperimentalFlags.ShapesExperimental });
_pointCollectionConverter = new PointCollectionConverter();
}

Просмотреть файл

@ -8,8 +8,6 @@ namespace Xamarin.Forms.Core.UnitTests
public override void Setup()
{
base.Setup();
Device.SetFlags(new[] { ExperimentalFlags.BrushExperimental });
}
[Test]

Просмотреть файл

@ -11,7 +11,6 @@ namespace Xamarin.Forms.Core.UnitTests
{
base.Setup();
Device.SetFlags(new[] { ExperimentalFlags.ShapesExperimental });
}
[Test]

Просмотреть файл

@ -8,8 +8,6 @@ namespace Xamarin.Forms.Core.UnitTests
public override void Setup()
{
base.Setup();
Device.SetFlags(new[] { ExperimentalFlags.BrushExperimental });
}
[Test]

Просмотреть файл

@ -5,14 +5,6 @@ namespace Xamarin.Forms.Core.UnitTests
[TestFixture]
public class SwipeViewTests : BaseTestFixture
{
[SetUp]
public override void Setup()
{
base.Setup();
Device.SetFlags(new[] { ExperimentalFlags.SwipeViewExperimental });
}
[Test]
public void TestConstructor()
{

Просмотреть файл

@ -25,7 +25,6 @@ namespace Xamarin.Forms
public DragGestureRecognizer()
{
ExperimentalFlags.VerifyFlagEnabled(nameof(DragGestureRecognizer), ExperimentalFlags.DragAndDropExperimental);
}
public event EventHandler<DropCompletedEventArgs> DropCompleted;

Просмотреть файл

@ -25,7 +25,6 @@ namespace Xamarin.Forms
public DropGestureRecognizer()
{
ExperimentalFlags.VerifyFlagEnabled(nameof(DropGestureRecognizer), ExperimentalFlags.DragAndDropExperimental);
}
public event EventHandler<DragEventArgs> DragLeave;

Просмотреть файл

@ -10,14 +10,9 @@ namespace Xamarin.Forms
static class ExperimentalFlags
{
internal const string ShellUWPExperimental = "Shell_UWP_Experimental";
internal const string CarouselViewExperimental = "CarouselView_Experimental";
internal const string SwipeViewExperimental = "SwipeView_Experimental";
internal const string MarkupExperimental = "Markup_Experimental";
internal const string RadioButtonExperimental = "RadioButton_Experimental";
internal const string ShapesExperimental = "Shapes_Experimental";
internal const string BrushExperimental = "Brush_Experimental";
internal const string DragAndDropExperimental = "DragAndDrop_Experimental";
[EditorBrowsable(EditorBrowsableState.Never)]
public static void VerifyFlagEnabled(
string coreComponentName,

Просмотреть файл

@ -8,27 +8,13 @@ namespace Xamarin.Forms
[ContentProperty(nameof(GradientStops))]
public abstract class GradientBrush : Brush
{
static bool IsExperimentalFlagSet = false;
public GradientBrush()
{
VerifyExperimental(nameof(GradientBrush));
GradientStops = new GradientStopCollection();
}
public event EventHandler InvalidateGradientBrushRequested;
internal static void VerifyExperimental([CallerMemberName] string memberName = "", string constructorHint = null)
{
if (IsExperimentalFlagSet)
return;
ExperimentalFlags.VerifyFlagEnabled(nameof(GradientBrush), ExperimentalFlags.BrushExperimental, constructorHint, memberName);
IsExperimentalFlagSet = true;
}
public static readonly BindableProperty GradientStopsProperty =
BindableProperty.Create(nameof(GradientStops), typeof(GradientStopCollection), typeof(GradientBrush), null,
propertyChanged: OnGradientStopsChanged);

Просмотреть файл

@ -196,7 +196,6 @@ namespace Xamarin.Forms
public CarouselView()
{
VerifyCarouselViewFlagEnabled(constructorHint: nameof(CarouselView));
ItemsLayout = new LinearItemsLayout(ItemsLayoutOrientation.Horizontal)
{
SnapPointsType = SnapPointsType.MandatorySingle,
@ -204,22 +203,6 @@ namespace Xamarin.Forms
};
}
[EditorBrowsable(EditorBrowsableState.Never)]
public static void VerifyCarouselViewFlagEnabled(
string constructorHint = null,
[CallerMemberName] string memberName = "")
{
try
{
ExperimentalFlags.VerifyFlagEnabled(nameof(CollectionView), ExperimentalFlags.CarouselViewExperimental,
constructorHint, memberName);
}
catch (InvalidOperationException)
{
}
}
protected virtual void OnPositionChanged(PositionChangedEventArgs args)
{
}

Просмотреть файл

@ -4,7 +4,6 @@
{
public Shape()
{
ExperimentalFlags.VerifyFlagEnabled(nameof(Shape), ExperimentalFlags.ShapesExperimental);
}
public static readonly BindableProperty FillProperty =

Просмотреть файл

@ -16,14 +16,6 @@ namespace Xamarin.Forms
_platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<SwipeView>>(() => new PlatformConfigurationRegistry<SwipeView>(this));
}
[EditorBrowsable(EditorBrowsableState.Never)]
public static void VerifySwipeViewFlagEnabled(
string constructorHint = null,
[CallerMemberName] string memberName = "")
{
ExperimentalFlags.VerifyFlagEnabled(nameof(SwipeView), ExperimentalFlags.SwipeViewExperimental, memberName: memberName);
}
public static readonly BindableProperty LeftItemsProperty =
BindableProperty.Create(nameof(LeftItems), typeof(SwipeItems), typeof(SwipeView), null, BindingMode.OneWay, null, defaultValueCreator: SwipeItemsDefaultValueCreator,
propertyChanged: OnSwipeItemsChanged);

Просмотреть файл

@ -25,14 +25,6 @@ namespace Xamarin.Forms.Platform.Android.UnitTests
}
}
[SetUp]
public override void Setup()
{
base.Setup();
Device.SetFlags(new[] { "Brush_Experimental" });
}
[Test, Category("Background"), Category("Frame")]
[Description("Frame background should match renderer background")]
public async Task FrameLinearGradientBrushConsistent()

Просмотреть файл

@ -30,7 +30,6 @@ namespace Xamarin.Forms.Platform.Android
public CarouselViewRenderer(Context context) : base(context)
{
FormsCarouselView.VerifyCarouselViewFlagEnabled(nameof(CarouselViewRenderer));
_oldViews = new List<View>();
_carouselViewLoopManager = new CarouselViewLoopManager();
}

Просмотреть файл

@ -50,8 +50,6 @@ namespace Xamarin.Forms.Platform.Android
public SwipeViewRenderer(Context context) : base(context)
{
SwipeView.VerifySwipeViewFlagEnabled(nameof(SwipeViewRenderer));
_context = context;
_swipeItems = new Dictionary<ISwipeItem, object>();

Просмотреть файл

@ -24,7 +24,6 @@ namespace Xamarin.Forms.Platform.UWP
public CarouselViewRenderer()
{
CarouselView.VerifyCarouselViewFlagEnabled(nameof(Xamarin.Forms.CarouselView));
}
protected CarouselView CarouselView => Element;

Просмотреть файл

@ -21,7 +21,6 @@ namespace Xamarin.Forms.Platform.UWP
public SwipeViewRenderer()
{
Xamarin.Forms.SwipeView.VerifySwipeViewFlagEnabled(nameof(SwipeViewRenderer));
AutoPackage = false;
}

Просмотреть файл

@ -25,14 +25,6 @@ namespace Xamarin.Forms.Platform.iOS.UnitTests
}
}
[SetUp]
public override void Setup()
{
base.Setup();
Device.SetFlags(new[] { "Brush_Experimental" });
}
[Test, Category("Background"), Category("Frame")]
[Description("Frame background should match renderer background")]
public async Task FrameLinearGradientBrushConsistent()

Просмотреть файл

@ -12,7 +12,6 @@ namespace Xamarin.Forms.Platform.iOS
[Preserve(Conditional = true)]
public CarouselViewRenderer()
{
CarouselView.VerifyCarouselViewFlagEnabled(nameof(CarouselViewRenderer));
}
protected override CarouselViewController CreateController(CarouselView newElement, ItemsViewLayout layout)

Просмотреть файл

@ -47,8 +47,6 @@ namespace Xamarin.Forms.Platform.iOS
[Internals.Preserve(Conditional = true)]
public SwipeViewRenderer()
{
SwipeView.VerifySwipeViewFlagEnabled(nameof(SwipeViewRenderer));
_swipeItems = new Dictionary<ISwipeItem, object>();
_isScrollEnabled = true;