public static void SetOnAppTheme <T>(this BindableObject self, BindableProperty targetProperty, T light, T dark, T defaultValue = default)
        {
            ExperimentalFlags.VerifyFlagEnabled(nameof(BindableObjectExtensions), ExperimentalFlags.AppThemeExperimental, nameof(BindableObjectExtensions), nameof(SetOnAppTheme));

            var appTheme = new OnAppTheme <T> {
                Light = light, Dark = dark, Default = defaultValue
            };

            self.SetBinding(targetProperty, appTheme);
        }
Exemplo n.º 2
0
        internal static void VerifyExperimental([CallerMemberName] string memberName = "", string constructorHint = null)
        {
            if (isExperimentalFlagSet)
            {
                return;
            }

            ExperimentalFlags.VerifyFlagEnabled(nameof(Markup), ExperimentalFlags.ExpanderExperimental, constructorHint, memberName);

            isExperimentalFlagSet = true;
        }
Exemplo n.º 3
0
 public static void VerifySwipeViewFlagEnabled(
     string constructorHint = null,
     [CallerMemberName] string memberName = "")
 {
     ExperimentalFlags.VerifyFlagEnabled(nameof(SwipeView), ExperimentalFlags.SwipeViewExperimental, memberName: memberName);
 }
Exemplo n.º 4
0
        public AppThemeColor()
        {
            ExperimentalFlags.VerifyFlagEnabled(nameof(AppThemeColor), ExperimentalFlags.AppThemeExperimental, nameof(AppThemeColor));

            Application.Current.RequestedThemeChanged += RequestedThemeChanged;
        }
Exemplo n.º 5
0
 public StateTriggerBase()
 {
     ExperimentalFlags.VerifyFlagEnabled(nameof(IndicatorView), ExperimentalFlags.StateTriggersExperimental);
 }
Exemplo n.º 6
0
 public IndicatorView()
 {
     ExperimentalFlags.VerifyFlagEnabled(nameof(IndicatorView), ExperimentalFlags.IndicatorViewExperimental);
 }
Exemplo n.º 7
0
 public StateTriggerBase()
 {
     ExperimentalFlags.VerifyFlagEnabled(nameof(StateTriggerBase), ExperimentalFlags.StateTriggersExperimental);
 }
Exemplo n.º 8
0
 public static void VerifyMediaElementFlagEnabled(
     string constructorHint = null,
     [CallerMemberName] string memberName = "")
 {
     ExperimentalFlags.VerifyFlagEnabled(nameof(MediaElement), ExperimentalFlags.MediaElementExperimental, memberName: memberName);
 }
Exemplo n.º 9
0
 public static void VerifyCollectionViewFlagEnabled(
     string constructorHint = null,
     [CallerMemberName] string memberName = "")
 {
     ExperimentalFlags.VerifyFlagEnabled(nameof(CollectionView), ExperimentalFlags.CollectionViewExperimental);
 }