public override Android.Views.View GetSampleContent(Android.Content.Context context) { // Initializing grid with required properties this.sfGrid = new SfDataGrid(context); this.sfGrid.AutoGenerateColumns = true; this.itemViewModel = new ContextMenuModel(); this.sfGrid.ItemsSource = itemViewModel.OrderInfo; this.sfPopupLayout = new SfPopupLayout(context); //Calculation for the image and gridHeight this.displayDensity = (sfPopupLayout.Resources.DisplayMetrics.Density); this.imagesHeight = (int)(initialValue * displayDensity); this.gridHeight = (int)(198.5 * displayDensity) / 5; //Initializing SfPoplayout with required properties this.InitializePopLayout(context); //Initializing the layout to be displayed inside popup this.InitializingContextMenuLayout(context); this.sfGrid.GridLongPressed += SfGrid_GridLongPressed; //RootView is Poplayout so sfgrid view added as child to poppup this.sfPopupLayout.Content = this.sfGrid; return(sfPopupLayout); }
public override void Destroy() { sfGrid.Dispose(); sfGrid = null; itemViewModel = null; base.Destroy(); }
public override void Destroy() { this.sfPopupLayout.Dispose(); sfGrid = null; itemViewModel = null; }