如何使用MonoDevelop Docking Library

时间:2015-06-09 19:49:10

标签: c# mono gtk monodevelop docking

我正在尝试使用MonoDevelop Docking Library创建一个示例应用程序。 我使用以下代码,但它不显示任何项目。

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 ();
}

或任何有关如何使用MonoDevelop Docking Library的示例

1 个答案:

答案 0 :(得分:0)

最后让它工作,(如果添加了正确的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 ();
}