Exemplo n.º 1
0
        public FormHandler()
        {
            Control = new Gtk.Window(Gtk.WindowType.Toplevel);
#if GTK2
            Control.AllowGrow = true;
#endif
            Resizable = true;
            Control.SetPosition(Gtk.WindowPosition.Center);

            var vbox = new EtoVBox {
                Handler = this
            };
            vbox.PackStart(WindowActionControl, false, true, 0);
            vbox.PackStart(WindowContentControl, true, true, 0);
            Control.Child = vbox;
        }
Exemplo n.º 2
0
        protected override void Initialize()
        {
            base.Initialize();
            Control.KeyPressEvent += Connector.Control_KeyPressEvent;

            var vbox = new EtoVBox {
                Handler = this
            };

            vbox.PackStart(WindowActionControl, false, true, 0);
            vbox.PackStart(WindowContentControl, true, true, 0);

#pragma warning disable 612
            actionarea = Control.ActionArea;
#pragma warning restore 612

#if GTK2
            var content = Control.VBox;
            btcontainer = Control.ActionArea;
#else
            var content = Control.ContentArea;

            actionarea.NoShowAll = true;
            actionarea.Hide();

#if GTKCORE
            if (Helper.UseHeaderBar)
            {
                btcontainer = new Gtk.HeaderBar();

                var title = Control.Title;
                Control.Titlebar = btcontainer;
                Control.Title    = title;
            }
            else
#endif
            btcontainer = actionarea;
#endif

            content.PackStart(vbox, true, true, 0);
        }