public Designer()
        {
            VBox   box = new VBox();
            Button b   = new Button("Hi there");

            box.PackStart(b);
            Label la = new Label("Some label");

            box.PackStart(la);
            HBox hb = new HBox();

            hb.PackStart(new Label("Text"));
            var cb = new ComboBox();

            cb.Items.Add("One");
            cb.Items.Add("Two");
            cb.SelectedIndex = 0;
            hb.PackStart(cb);
            box.PackStart(hb);

            DesignerSurface ds = new DesignerSurface();

            ds.Load(box);
            PackStart(ds, true);
        }
示例#2
0
 public DesignCommandsHost(DesignerSurface designerSurface)
 {
     AlignLeft   = designerSurface.AlignToLeftCommand;
     AlignTop    = designerSurface.AlignToTopCommand;
     AlignRight  = designerSurface.AlignToRightCommand;
     AlignBottom = designerSurface.AlignToBottomCommand;
 }