예제 #1
0
 public override void Destroy()
 {
     pullToRefresh.Refreshing -= Pull_Refreshing;
     viewModel = null;
     pullToRefresh.Dispose();
     pullToRefresh = null;
 }
예제 #2
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (SfGrid != null)
         {
             SfGrid.AutoGeneratingColumn -= GridAutoGenerateColumns;
             SfGrid.Dispose();
         }
         viewModel = null;
         SfGrid    = null;
     }
     base.Dispose(disposing);
 }
예제 #3
0
 public PullToRefresh()
 {
     this.SfGrid = new SfDataGrid();
     viewModel   = new PullToRefreshViewModel();
     this.SfGrid.AutoGeneratingColumn += GridAutoGenerateColumns;
     this.SfGrid.SelectionMode         = SelectionMode.Single;
     this.SfGrid.ItemsSource           = viewModel.OrdersInfo;
     this.SfGrid.ShowRowHeader         = false;
     this.SfGrid.HeaderRowHeight       = 45;
     this.SfGrid.RowHeight             = 45;
     this.SfGrid.AllowPullToRefresh    = true;
     this.SfGrid.PullToRefreshCommand  = new Command(ExecuteCommand);
     this.AddSubview(this.SfGrid);
 }
예제 #4
0
 public override View GetSampleContent(Context context)
 {
     pullToRefresh             = new SfPullToRefresh(context);
     pullToRefresh.Refreshing += Pull_Refreshing;
     sfGrid = new SfDataGrid(context);
     sfGrid.HeaderRowHeight = 52;
     pullToRefresh.RefreshContentThreshold = 52;
     sfGrid.RowHeight     = 48;
     viewModel            = new PullToRefreshViewModel();
     sfGrid.SelectionMode = SelectionMode.Single;
     viewModel.SetRowstoGenerate(100);
     sfGrid.AutoGenerateColumns = false;
     sfGrid.ColumnSizer         = ColumnSizer.Star;
     GridGenerateColumns();
     sfGrid.ItemsSource            = (viewModel.OrdersInfo);
     sfGrid.AllowResizingColumn    = true;
     sfGrid.VerticalOverScrollMode = VerticalOverScrollMode.None;
     pullToRefresh.PullableContent = sfGrid;
     return(pullToRefresh);
 }
예제 #5
0
 public override void Destroy()
 {
     sfGrid.Dispose();
     sfGrid    = null;
     viewModel = null;
 }