コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: Expander.cs プロジェクト: zkolar/Xamarin.Forms
        internal static void VerifyExperimental([CallerMemberName] string memberName = "", string constructorHint = null)
        {
            if (isExperimentalFlagSet)
            {
                return;
            }

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

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

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