页面在装订完成之前未加载

时间:2017-11-09 14:26:24

标签: xamarin.forms

    protected override   void OnAppearing()
        {
            base.OnAppearing();
            Device.BeginInvokeOnMainThread( () =>
            {
     WaitingIndicator.IsRunning = true;
            var dataModel = new ClassListViewModel();
            ListViewClass.ItemsSource = dataModel.Classes;
            ListViewClass.IsPullToRefreshEnabled = true;
            ListViewClass.RefreshCommand = dataModel.RefreshCommand;
            ListViewClass.BackgroundColor = Color.FromHex("#BDBAB6");
            ListViewClass.RowHeight = 200;
            ListViewClass.SeparatorVisibility = SeparatorVisibility.None;
            ListViewClass.ItemTemplate = new DataTemplate(Function);
            ListViewPagningBehavior ListViewBehaviour = new ListViewPagningBehavior();
            ListViewBehaviour.Converter = new ItemVisibilityEventArgstemConverter();
            ListViewBehaviour.Command = dataModel.LoadMoreCommand;
            ListViewClass.Behaviors.Add(ListViewBehaviour);
            //BindingContext = dataModel;
            ListViewClass.SetBinding(ListView.IsRefreshingProperty, "IsBusy");
            ListViewClass.BindingContext = dataModel;
            stack.Children.Remove(WaitingIndicator);
            });

我从另一页翻到上面的页面 我的问题是,在bindingcontext完成之前,页面才会显示 但我想在等待装订时向用户显示等待指示

0 个答案:

没有答案