在AvalonDock上以编程方式添加LayoutAnchorable

时间:2014-02-08 02:28:26

标签: c# wpf avalondock

我正在尝试从代码中向AvalonDock添加一个新的Control。 这是代码:

var test = new LayoutAnchorable();
test.Title = "teste";
test.IsActive = true;
test.IsSelected = true;
test.ContentId = "search12";
test.Content = new TextBox();
test.AddToLayout(dockingManager, AnchorableShowStrategy.Right);

新面板显示,但内容不显示(只是灰色面板)。 为什么呢?

0 个答案:

没有答案