Ejemplo n.º 1
0
        public PropertyPad()
        {
            frame = new InvisibleFrame();

#if MAC
            isNative = true;

            if (isNative)
            {
                nativeGrid   = new MacPropertyGrid();
                propertyGrid = nativeGrid;
                nativeGrid.PropertyGridChanged += Grid_Changed;
                gtkWidget = new GtkNSViewHost(nativeGrid);

                frame.Add(gtkWidget);
            }
            else
            {
#endif
            grid          = new pg.PropertyGrid();
            propertyGrid  = grid;
            grid.Changed += Grid_Changed;
            frame.Add(grid);
#if MAC
        }
#endif
            frame.ShowAll();
        }
Ejemplo n.º 2
0
        public PropertyPad()
        {
            frame = new InvisibleFrame();

#if MAC
            isNative = FeatureSwitchService.IsFeatureEnabled("NativePropertyPanel") ?? false;

            if (isNative)
            {
                nativeGrid   = new MacPropertyGrid();
                propertyGrid = nativeGrid;

                gtkWidget           = Components.Mac.GtkMacInterop.NSViewToGtkWidget(nativeGrid);
                gtkWidget.CanFocus  = true;
                gtkWidget.Sensitive = true;
                gtkWidget.Focused  += Widget_Focused;

                nativeGrid.Focused += PropertyGrid_Focused;
                frame.Add(gtkWidget);
            }
            else
            {
#endif
            grid          = new pg.PropertyGrid();
            propertyGrid  = grid;
            grid.Changed += Grid_Changed;
            frame.Add(grid);
#if MAC
        }
#endif
            frame.ShowAll();
        }