使用Avalon加载布局时出错 [英] Error loading Layout with Avalon
问题描述
我对Avalon有以下问题:
我正在保存我的布局:
var serializerSaver = new XmlLayoutSerializer(DockingManager);
使用(var save = new StreamWriter(fileName))
serializerSaver.Serialize(保存);
像这样加载:
var serializerLoader = new XmlLayoutSerializer(DockingManager);
使用(var load = new StreamReader(fileName))
serializerLoader.Deserialize(load);
到目前为止没什么奇怪的..但我想能够关闭并打开我正在使用的码头。我正在重新打开它们:
dockPanel3.AddToLayout(DockingManager,Xceed.Wpf.AvalonDock.Layout.AnchorableShowStrategy.Right);
问题是..如果我加载一个保存的布局,Event IsVisibleChanged就会停止发生。事件不再被触发..但这只发生在我加载已保存的布局时,否则我可以随时关闭并打开任何布局。
有谁知道为什么?我该如何解决?
谢谢
I having the following problem with Avalon:
I'm saving my Layout like this:
var serializerSaver = new XmlLayoutSerializer(DockingManager);
using (var save = new StreamWriter(fileName))
serializerSaver.Serialize(save);
And loading it like this:
var serializerLoader = new XmlLayoutSerializer(DockingManager);
using (var load = new StreamReader(fileName))
serializerLoader.Deserialize(load);
Nothing strange so far.. But I wanna be able to close and open the docks that I'm working with. I'm re-opening them like this:
dockPanel3.AddToLayout(DockingManager, Xceed.Wpf.AvalonDock.Layout.AnchorableShowStrategy.Right);
The problem is .. if I load a saved Layout, the Event IsVisibleChanged stops happening. The Event is not triggered anymore .. But this only happens when I load a saved Layout, otherwise I can close and open any Layout whenever I want.
Does anyone know why? And how can I fix it?
Thanks
推荐答案
你为什么不在AvalongDock论坛,此处 [ ^ ] ??
这里的任何人都不太可能知道你需要知道的关于AvalonDock的一切。如果您对第三方图书馆有疑问,那么您对该图书馆的最佳信息来源将是撰写该图书馆的人或专门论坛的人。
Why are you not asking your question in the forums for AvalongDock, found here[^]??
It's very unlikely anyone here is going to know everything you need to know about AvalonDock. If you've got a question about a third party library, your single best source of information on that library is going to be the people that wrote it, or a forum dedicated to it.
因为在那些论坛上我也没有得到答案。
Because on those Forums I also don't get an answer.
这篇关于使用Avalon加载布局时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!