0
我想在Silverlight中打开一个ChildWindow。内容是托管在ChildWindow内的ContentControl中的各种视图。Silverlight ChildWindow根据内容设置大小,但然后修复大小
子窗口打开,它的大小是根据其内容。这是理想的行为。问题是,当内容调整大小时(例如Tab控件,网格 - 添加/删除列),子窗口也调整大小。
有什么办法可以禁用childwindows自动调整大小吗?试图设置MaxWidth/MaxHeight和MinWidth/MinHeight。问题是我不知道如何计算内容的大小。
预先感谢您:)
这似乎是解决办法,但不正确时childwindows ContentControl中工作是另一个ContentControl中(例如, ) –
我不确定你的确切控制层次结构,这对我有效: ChildWindow> Grid(extraGrid)> TabControl> TabItems –
我使用MVVM和Caliburn.Micro。 (1) - TestView - > tabcontrol - > tabitem - > contentcontrol(2) TestView是在contentcontrol 1中的其他视图,在contentcontrol 2中的其他视图。 –