Beispiel #1
0
        public MainPage()
        {
            InitializeComponent();

            this.BindingContext = App.MainViewModel;

            _accentColor          = ((BooksViewModel)BindingContext).SwapFromBook.Colors.Accent.ToSKColor();
            _accentDarkColor      = ((BooksViewModel)BindingContext).SwapFromBook.Colors.DarkAccent.ToSKColor();
            _accentExtraDarkColor = ((BooksViewModel)BindingContext).SwapFromBook.Colors.ExtraDarkAccent.ToSKColor();
            _accentPaint          = new SKPaint()
            {
                Color = _accentColor
            };
            _accentDarkPaint = new SKPaint()
            {
                Color = _accentDarkColor
            };
            _accentExtraDarkPaint = new SKPaint()
            {
                Color = _accentExtraDarkColor
            };

            var eff = new XFUtils.Effects.ScrollReporterEffect();

            eff.ScrollChanged += Eff_ScrollChanged;
            BooksListView.Effects.Add(eff);
        }
Beispiel #2
0
        public MainPage()
        {
            InitializeComponent();
            Color color = Color.FromHex("#FFF571");

            _accentColor          = color.ToSKColor();
            _accentDarkColor      = color.WithLuminosity(color.Luminosity - .2).ToSKColor();
            _accentExtraDarkColor = color.WithLuminosity(color.Luminosity - .25).ToSKColor();
            _accentPaint          = new SKPaint()
            {
                Color = _accentColor
            };
            _accentDarkPaint = new SKPaint()
            {
                Color = _accentDarkColor
            };
            _accentExtraDarkPaint = new SKPaint()
            {
                Color = _accentExtraDarkColor
            };

            var eff = new XFUtils.Effects.ScrollReporterEffect();

            eff.ScrollChanged += Eff_ScrollChanged;
            BooksListView.Effects.Add(eff);
        }
Beispiel #3
0
        protected override void OnAppearing()
        {
            base.OnAppearing();

            for (int i = 0; i < 100; i++)
            {
                listItems.Add($"List item {i}");
            }
            MyListView.ItemsSource = listItems;

            var eff = new XFUtils.Effects.ScrollReporterEffect();

            MyListView.Effects.Add(eff);
            eff.ScrollChanged += Eff_ScrollChanged;
        }
        public ChildChorePage()
        {
            InitializeComponent();
            BindingContext             = ViewModelLocator.MainViewModel;
            weightSlider.ValueChanged += MySlider_ValueChanged;
            posSlider.ValueChanged    += MySlider_ValueChanged;

            string   resourceID = "OpenChore.Images.ChoreBackground.png";
            Assembly assembly   = GetType().GetTypeInfo().Assembly;

            using (Stream stream = assembly.GetManifestResourceStream(resourceID))
            {
                resourceBitmap = SKBitmap.Decode(stream);
            }

            scrollEffect = new XFUtils.Effects.ScrollReporterEffect();
            ChoreList.Effects.Add(scrollEffect);
            scrollEffect.ScrollChanged += ScrollEffect_ScrollChanged;
        }