How to use MonoDevelop Docking Library

408 views Asked by At

I am trying to create a sample application using MonoDevelop Docking Library. I am using the following code but its not displaying any items.

public MainWindow () : base (Gtk.WindowType.Toplevel)
{
    Build ();

    DockFrame df = new DockFrame ();
    Add (df);

    DockItem item = df.AddItem ("Document");
    item.DefaultVisible = true;
    item.DefaultLocation = "Documents/Left";
    item.DrawFrame = false;

    df.ShowAll ();
    ShowAll ();
}

Or any examples as how to use MonoDevelop Docking Library

1

There are 1 answers

0
user1800354 On

Finally got it working, (if added correct Mono Develop Libraries References)

public MainWindow () : base (Gtk.WindowType.Toplevel)
{
    Build ();

    DockFrame df = new DockFrame ();
    Add (df);

    DockItem item = df.AddItem ("Document");
    item.DefaultVisible = true;
    item.Label = "Document Label";
    item.DrawFrame = false;
    item.Content = new Label ("Hello Docking");

    df.DefaultVisualStyle = new DockVisualStyle () {
        ExpandedTabs = false,
        InactivePadBackgroundColor = Styles.InactivePadBackground,
        PadBackgroundColor = Styles.PadBackground,
        PadTitleLabelColor = Styles.PadLabelColor
    };

    df.CreateLayout ("SomeLayout");
    df.CurrentLayout = "SomeLayout";

    item.Visible = true;
    df.ShowAll ();
    ShowAll ();
}