Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public override void Destroy()
 {
     sfGrid.Dispose();
     sfGrid        = null;
     itemViewModel = null;
     base.Destroy();
 }
Ejemplo n.º 3
0
 public override void Destroy()
 {
     this.sfPopupLayout.Dispose();
     sfGrid        = null;
     itemViewModel = null;
 }