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); }
internal static void VerifyExperimental([CallerMemberName] string memberName = "", string constructorHint = null) { if (isExperimentalFlagSet) { return; } ExperimentalFlags.VerifyFlagEnabled(nameof(Markup), ExperimentalFlags.ExpanderExperimental, constructorHint, memberName); isExperimentalFlagSet = true; }
public static void VerifySwipeViewFlagEnabled( string constructorHint = null, [CallerMemberName] string memberName = "") { ExperimentalFlags.VerifyFlagEnabled(nameof(SwipeView), ExperimentalFlags.SwipeViewExperimental, memberName: memberName); }
public AppThemeColor() { ExperimentalFlags.VerifyFlagEnabled(nameof(AppThemeColor), ExperimentalFlags.AppThemeExperimental, nameof(AppThemeColor)); Application.Current.RequestedThemeChanged += RequestedThemeChanged; }
public StateTriggerBase() { ExperimentalFlags.VerifyFlagEnabled(nameof(IndicatorView), ExperimentalFlags.StateTriggersExperimental); }
public IndicatorView() { ExperimentalFlags.VerifyFlagEnabled(nameof(IndicatorView), ExperimentalFlags.IndicatorViewExperimental); }
public StateTriggerBase() { ExperimentalFlags.VerifyFlagEnabled(nameof(StateTriggerBase), ExperimentalFlags.StateTriggersExperimental); }
public static void VerifyMediaElementFlagEnabled( string constructorHint = null, [CallerMemberName] string memberName = "") { ExperimentalFlags.VerifyFlagEnabled(nameof(MediaElement), ExperimentalFlags.MediaElementExperimental, memberName: memberName); }
public static void VerifyCollectionViewFlagEnabled( string constructorHint = null, [CallerMemberName] string memberName = "") { ExperimentalFlags.VerifyFlagEnabled(nameof(CollectionView), ExperimentalFlags.CollectionViewExperimental); }