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);
        }
Example #2
0
        internal static void VerifyExperimental([CallerMemberName] string memberName = "", string constructorHint = null)
        {
            if (isExperimentalFlagSet)
            {
                return;
            }

            ExperimentalFlags.VerifyFlagEnabled(nameof(RadioButton), ExperimentalFlags.RadioButtonExperimental, constructorHint, memberName);

            isExperimentalFlagSet = true;
        }
Example #3
0
 public static void VerifySwipeViewFlagEnabled(
     string constructorHint = null,
     [CallerMemberName] string memberName = "")
 {
     ExperimentalFlags.VerifyFlagEnabled(nameof(SwipeView), ExperimentalFlags.SwipeViewExperimental, memberName: memberName);
 }
Example #4
0
 public StateTriggerBase()
 {
     ExperimentalFlags.VerifyFlagEnabled(nameof(StateTriggerBase), ExperimentalFlags.StateTriggersExperimental);
 }
Example #5
0
 public IndicatorView()
 {
     ExperimentalFlags.VerifyFlagEnabled(nameof(IndicatorView), ExperimentalFlags.IndicatorViewExperimental);
 }
Example #6
0
 public static void VerifyMediaElementFlagEnabled(
     string constructorHint = null,
     [CallerMemberName] string memberName = "")
 {
     ExperimentalFlags.VerifyFlagEnabled(nameof(MediaElement), ExperimentalFlags.MediaElementExperimental, memberName: memberName);
 }