public override void Destroy() { pullToRefresh.Refreshing -= Pull_Refreshing; viewModel = null; pullToRefresh.Dispose(); pullToRefresh = null; }
protected override void Dispose(bool disposing) { if (disposing) { if (SfGrid != null) { SfGrid.AutoGeneratingColumn -= GridAutoGenerateColumns; SfGrid.Dispose(); } viewModel = null; SfGrid = null; } base.Dispose(disposing); }
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); }
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); }
public override void Destroy() { sfGrid.Dispose(); sfGrid = null; viewModel = null; }