TabGroupPaneRegionAdapter,如何在关闭后再次打开内容窗格

发布于 2024-12-21 11:36:04 字数 451 浏览 1 评论 0原文

我正在使用 Infragistics 中的 TabGroupPaneRegionAdapter 在 TabGroupPan 中显示 ContentPane 以具有停靠功能。我不知道我做的事情是否正确。我遇到的问题是一旦内容窗格从 TabGroupPan 关闭。我无法再重新开始了。

我正在使用MEF。我最初打开视图的方式是通过RequestNavigate API。

Uri viewNav = new Uri("View1", UriKind.Relative);
regionManager.RequestNavigate(RegionNames.WorkspaceRegion, viewNav);

我注意到的另一件事是,一旦 contentPane 关闭,OnViewsCollectionChanged 就不会被调用。这是否意味着 View 仍然存在于该区域。如果正确的话我应该能够再次导航它。

I am using TabGroupPaneRegionAdapter from Infragistics for displaying ContentPane in TabGroupPan to having Docking functionality. I don't know if I am doing something in correct. The problem that I am having is once the contentpane is closed from the TabGroupPan. I can no longer start it again.

I am using MEF. The way I originally opened the view is through RequestNavigate API.

Uri viewNav = new Uri("View1", UriKind.Relative);
regionManager.RequestNavigate(RegionNames.WorkspaceRegion, viewNav);

and the other thing I noticed is, as soon as contentPane is closed OnViewsCollectionChanged is not invoked. Does this mean that View is still present in the region. If corrent then should I be just able to navigate it again.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

老街孤人 2024-12-28 11:36:04

Infragistics 不提供 TabGroupPaneRegionAdapter 所以我对此不熟悉。唯一的。 Infragistics 提供的唯一区域适配器位于 codeplex 上,并且在过去三年中没有更新:
http://ncal.codeplex.com/

在 Google 上进行搜索,我确实找到了以下博客文章,并且这可能就是您正在使用的(尽管这也已经三年没有更新):
http://claudiopi.blogspot.com/2008/07/infragistics-tabgrouppane -region.html

尽管我查看了代码,但我还没有进行任何测试,似乎应该更新 TabGroupPaneRegionAdapter 以便ContentPane 的 CloseAction 在创建 ContentPane 时设置,而不是仅在删除视图时设置,因为在使用当前实现设置 CloseAction 时窗格已经关闭。

有关 ContentPane 的 CloseAction 的更多详细信息,请参见此处:
http://help.infragistics.com/NetAdvantage/WPF/Current/CLR4.0/?page=InfragisticsWPF4.DockManager.v11.2~Infragistics.Windows.DockManager.ContentPane~CloseAction.html

请注意,如果 TabGroupPaneRegionAdapter 中未触发 OnViewsCollectionChanged,则应设置断点在 OnContentPaneClosed 中的 if 语句上查看 if 语句的计算结果是 true 还是 false,因为这就是要删除视图的位置。

Infragistics doesn't provide a TabGroupPaneRegionAdapter so I am not familiar with this. The only. The only region adapters that Infragistics provided were on codeplex and haven't been updated in the last three years:
http://ncal.codeplex.com/

Doing a search on Google, I did find the following blog post and this may be what you are using (though this hasn't been updated in three years either):
http://claudiopi.blogspot.com/2008/07/infragistics-tabgrouppane-region.html

I haven't done any testing though I looked at the code and it appears as though the TabGroupPaneRegionAdapter should be updated so that the CloseAction of the ContentPane is set when the ContentPane is created rather than only when the views are removed as the panes are already closed when the CloseAction is being set with the current implementation.

There are more details on the CloseAction of a ContentPane here:
http://help.infragistics.com/NetAdvantage/WPF/Current/CLR4.0/?page=InfragisticsWPF4.DockManager.v11.2~Infragistics.Windows.DockManager.ContentPane~CloseAction.html

Note that if the OnViewsCollectionChanged isn't being fired in the TabGroupPaneRegionAdapter, you should set a break point on the if statement in OnContentPaneClosed to see if the if Statement evaluates to true or false as that is where the view is being removed.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文