Topics: Prism v2 - WPF 3.5
Apr 26, 2010 at 5:33 PM


I followed the StockTrader RI to created another applicaion with just one moudle and try to populate the region associated like below

                    ItemContainerStyle="{StaticResource ShellTabItemStyle}" 
                    Background="{StaticResource headerBarBG}" 
                    cal:RegionManager.RegionName="{x:Static infrastructure:RegionNames.MainRegion}"

However, the content of the module is not shown when I run the application.

If i just normal tabcontrol, the content of the module will show correctly.


Is there anything specialy I missed to configure the AnimatedTabControl?



Apr 27, 2010 at 9:27 AM
Edited Apr 27, 2010 at 9:28 AM

Hi, from what I can find so far is,

in the StockTraderRI, if we add only one module with views by commented out the others like below in StockTraderRIBootstrapper.cs and the run the application, we can see the POSITION menu. However, the view of POSITION module is not displayed. It seems we have to add at least two modules with views so that the customized AnimatedTabcontrol could work as expected.

Is it designed to work in that way? (Requires at least two mdoules with views?)

protected override IModuleCatalog GetModuleCatalog()
            var catalog = new ModuleCatalog();
                .AddModule(typeof(PositionModule), "MarketModule");
                //.AddModule(typeof(WatchModule), "MarketModule")

            return catalog;
May 12, 2010 at 6:29 PM


Sorry for the delayed response. I have taken a look at the RI code and was able to reproduce the behavior you described. I found that a possible way to get around it was updating the OnSelectionChanged method of the AnimatedTabControl as follows:


protected override void OnSelectionChanged(SelectionChangedEventArgs e) 
            if (e.AddedItems.Count > 0 && e.RemovedItems.Count == 0) 

            else if (e.RemovedItems.Count > 0) 

                this.lastArgs = e; 

                this.timer = new DispatcherTimer 
                    Interval = new TimeSpan(0, 0, 0, 0, 500) 

                this.timer.Tick += this.Timer_Tick; 

Take into account that the AnimatedTabControl  was not thought as a reusable component and that is was specifically designed to be used in the StockTrader RI. In addition, I only tried the workaround in the RI, so it might not work in all scenarios.

Please let me know if this helps.

Damian Schenkelman