Drop AppTheme flag (#11368)
This commit is contained in:
Родитель
57aefa6ade
Коммит
62b59281b3
|
@ -45,7 +45,7 @@ namespace Xamarin.Forms.ControlGallery.Android
|
|||
|
||||
#if TEST_EXPERIMENTAL_RENDERERS
|
||||
#else
|
||||
Forms.SetFlags("UseLegacyRenderers", "SwipeView_Experimental", "MediaElement_Experimental", "AppTheme_Experimental");
|
||||
Forms.SetFlags("UseLegacyRenderers", "SwipeView_Experimental", "MediaElement_Experimental");
|
||||
#endif
|
||||
Forms.Init(this, bundle);
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ namespace Xamarin.Forms.ControlGallery.WindowsUniversal
|
|||
|
||||
rootFrame.NavigationFailed += OnNavigationFailed;
|
||||
|
||||
Forms.SetFlags("Shell_UWP_Experimental", "SwipeView_Experimental", "MediaElement_Experimental", "AppTheme_Experimental");
|
||||
Forms.SetFlags("Shell_UWP_Experimental", "SwipeView_Experimental", "MediaElement_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", "MediaElement_Experimental", "AppTheme_Experimental");
|
||||
Forms.SetFlags("SwipeView_Experimental", "MediaElement_Experimental");
|
||||
Forms.Init();
|
||||
FormsMaps.Init();
|
||||
#if __XCODE11__
|
||||
|
|
|
@ -42,8 +42,6 @@
|
|||
button.Text = "AppTheme Enabled!";
|
||||
button.TextColor = Color.Black;
|
||||
button.IsEnabled = false;
|
||||
|
||||
Device.SetFlags(new[] { ExperimentalFlags.AppThemeExperimental });
|
||||
}
|
||||
}
|
||||
}
|
|
@ -10,8 +10,6 @@ namespace Xamarin.Forms.Core.UnitTests
|
|||
{
|
||||
base.Setup();
|
||||
Application.Current = new MockApplication();
|
||||
|
||||
Device.SetFlags(new[] { ExperimentalFlags.AppThemeExperimental });
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
|
|
@ -189,9 +189,6 @@ namespace Xamarin.Forms
|
|||
|
||||
void TriggerThemeChangedActual(AppThemeChangedEventArgs args)
|
||||
{
|
||||
if (Device.Flags == null || Device.Flags.IndexOf(ExperimentalFlags.AppThemeExperimental) == -1)
|
||||
return;
|
||||
|
||||
// On iOS the event is triggered more than once.
|
||||
// To minimize that for us, we only do it when the theme actually changes and it's not currently firing
|
||||
if (_themeChangedFiring || RequestedTheme == _lastAppTheme)
|
||||
|
|
|
@ -68,11 +68,7 @@ namespace Xamarin.Forms
|
|||
return returnIfNotSet;
|
||||
}
|
||||
|
||||
public static void SetOnAppTheme<T>(this BindableObject self, BindableProperty targetProperty, T light, T dark)
|
||||
{
|
||||
ExperimentalFlags.VerifyFlagEnabled(nameof(BindableObjectExtensions), ExperimentalFlags.AppThemeExperimental, nameof(BindableObjectExtensions), nameof(SetOnAppTheme));
|
||||
self.SetBinding(targetProperty, new AppThemeBinding { Light = light, Dark = dark});
|
||||
}
|
||||
public static void SetOnAppTheme<T>(this BindableObject self, BindableProperty targetProperty, T light, T dark) => self.SetBinding(targetProperty, new AppThemeBinding { Light = light, Dark = dark});
|
||||
|
||||
public static void SetAppThemeColor(this BindableObject self, BindableProperty targetProperty, Color light, Color dark) => SetOnAppTheme(self, targetProperty, light, dark);
|
||||
}
|
||||
|
|
|
@ -7,14 +7,13 @@ using System.Text;
|
|||
|
||||
namespace Xamarin.Forms
|
||||
{
|
||||
internal static class ExperimentalFlags
|
||||
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 MediaElementExperimental = "MediaElement_Experimental";
|
||||
internal const string MarkupExperimental = "Markup_Experimental";
|
||||
internal const string AppThemeExperimental = "AppTheme_Experimental";
|
||||
internal const string ExpanderExperimental = "Expander_Experimental";
|
||||
internal const string RadioButtonExperimental = "RadioButton_Experimental";
|
||||
internal const string ShapesExperimental = "Shapes_Experimental";
|
||||
|
|
|
@ -11,7 +11,6 @@ namespace Xamarin.Forms.Xaml.UnitTests
|
|||
public override void Setup()
|
||||
{
|
||||
base.Setup();
|
||||
Device.SetFlags(new[] { "AppTheme_Experimental" });
|
||||
Application.Current = new MockApplication();
|
||||
}
|
||||
|
||||
|
|
|
@ -14,11 +14,6 @@ namespace Xamarin.Forms.Xaml
|
|||
object _dark;
|
||||
bool _hasdark;
|
||||
|
||||
public AppThemeBindingExtension()
|
||||
{
|
||||
ExperimentalFlags.VerifyFlagEnabled(nameof(AppThemeBindingExtension), ExperimentalFlags.AppThemeExperimental, nameof(AppThemeBindingExtension));
|
||||
}
|
||||
|
||||
public object Default
|
||||
{
|
||||
get => _default; set
|
||||
|
|
Загрузка…
Ссылка в новой задаче