Example #1
0
        private async void Page_Load()
        {
            await App.Configuration.InitialAsync(this);

            NavigationPage.SetHasNavigationBar(this, true);
            BindingContext = _model;
            _model.SetActivityResource();
            await _model.LoadAppLanguages(OnLanguageRetrieve);

            await _model.LoadWeightVolume(BindWeightVolume);
        }
        public sealed override async void Init(object obj = null)
        {
            await App.Configuration.InitialAsync(this);

            NavigationPage.SetHasNavigationBar(this, true);
            IsEventAllowed = false;
            BindingContext = _model;
            _model.SetActivityResource();
            await Task.Run(async() =>
            {
                await Task.Delay(TimeSpan.FromMilliseconds(10));
                await _model.LoadAppLanguages(OnLanguageRetrieve);
                await _model.LoadWeightVolume(BindWeightVolume);
                Device.BeginInvokeOnMainThread(() =>
                {
                    tableView.Focus();
                    LanguageSelect_OnTapped(tableSection[0] as ViewCell, new EventArgs());
                    WeightVolumeSelect_OnTapped(tableSection[0] as ViewCell, new EventArgs());
                    IsEventAllowed = true;
                });
            });
        }