[英]WPF TabControl : Setting the initial tab to load automatically
I'm setting a view to TabRegion
: 我将视图设置为
TabRegion
:
_mainView = _container.Resolve<MainContent>();
_mainRegion.Add(_mainView, "MainContent");
_regionManager.RegisterViewWithRegion(RegionNames.TabRegion,
() => _container.Resolve<StrategyList>());
The region loads, but I still have to click the actual tab for the view to load. 该区域已加载,但是我仍然必须单击实际选项卡以加载该视图。 What do I need to do to have the view loaded in the first tab automatically without the need to click the tab itself?
我需要怎么做才能将视图自动加载到第一个选项卡中而无需单击选项卡本身?
您需要激活它。
IRegion.Activate(view)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.