Current filter:
                                You should refresh the page.
                                Support Center
                                  • Hello XAF Team,

                                    When using ConditionalAppearance to control visibility of tabs, the show/hide behavior is unstable. Sometimes it works, but sometimes it fails.

                                    Please run the Web project of the attached VS2010 solution (v12.1.7). To learn how to re-produce this issue, please view the .mp4 video (attached in the first comment).



                                Show all comments
                                • James Zhong 10.31.2012

                                  To view the screen video, please see the attached ConditionalAppearanceTabs.mp4 file.

                                • This appears to be a bug. Our developers will work on it.

                                • James Zhong 11.05.2012

                                  Thanks Anatol for your confirmation.
                                  This bug is a bit critical, because my business logic depends on the correct behavior, and now I got stuck.

                                • Thank you for the information, James.

                                • Konstantin M (DevExpress) 11.06.2012

                                  Hi James
                                  We have analyzed this problem and found that it can be avoided by switching off WebApplication.DelayedViewItemsInitialization.
                                  Alternatively, you can use simple groups in the layout instead of tabs. We will continue researching this problem and will return to you as soon as we have any results. Please bear with us.

                                • James Zhong 11.06.2012

                                  Thanks Konstantin for your suggestions!
                                  WebApplication.DelayedViewItemsInitialization is not a good idea, because that will significantly decrease the detail view loading performance (too long when entering the detail view).
                                  If the nested list views are not organized via tabs, but are organized in simple groups, then there will be two layout issues in Web: (1) The UI style is not consistent (no Tab header), compared to other tabs-based nested list views; (2) The toolbar's width is larger than the nested list view (grid) itself.
                                  So, it's better to resolve the described ConditionalAppearance compatibility issue with DelayedViewItemsInitialization (true) in Web UI.

                                • Thank you for the feedback, James. We hope you continue discussing the suggested temporary solution in Control DelayedViewItemsInitialization in View Controllers. I am afraid we do not have other workarounds at the moment.

                                • James Zhong 11.06.2012

                                  OK, thank you very much for your suggestions, Dennis. I'll try the workaround you provided in Q443212.

                                2 Solutions

                                Creation Date Rating Importance Sort by


                                Additional information:

                                In the 17.1 version, we have improved the scenario of loading the ASPxPageControl tab content when XafApplication.DelayedViewItemsInitialization equals true and the Conditional Appearance module is involved. So it is possible to revert the DelayedItemsInitialization option to true starting with the 17.1 version. Refer to the Web Layout Manager improvements and important changes in XAF v17.1 KB Article for more details.

                                Hi James,

                                By default, tabs' content is loaded on demand when a tab becomes active. This feature is called Delayed View Items Initialization. According to the research we performed, this feature cannot work correctly with Conditional Appearance rules hiding and showing tabs. This issue cannot be fixed without significant changes in our layout generation mechanism.

                                To avoid this behavior in the current version, consider one of the following solutions:
                                1. Disable delayed loading of DetailView items (tabs in particular) globally in the application by setting the DevExpress.ExpressApp > XafApplication > DelayedViewItemsInitialization  property to False in the YourSolutionName.Web/WebApplication.xx file:

                                namespace MainDemo.Web { public class MainDemoWebApplication : WebApplication { public MainDemoWebApplication() { InitializeComponent(); DelayedViewItemsInitialization = false;//!!! }

                                This global option was originally designed to improve the rendering performance for very complex detail forms, so I recommend you use the second solution and disable this option only for DetailView where you are really experiencing the aforementioned behavior.

                                2. Set the DevExpress.ExpressApp > CompositeView > DelayedItemsInitialization property for a particular DetailView object in the overridden OnActivated method of a custom ViewController descendant or in the overridden OnDetailViewCreated method of your WebApplication descendant in the YourSolutionName.Web/WebApplication.xx file:

                                namespace MainDemo.Web { public class MainDemoWebApplication : WebApplication { protected override void OnDetailViewCreated(DetailView view) { base.OnDetailViewCreated(view); if(view.ObjectTypeInfo.Type == typeof(Contact)) { view.DelayedItemsInitialization = false; } }

                                3. Redesign your DetailView layout to avoid tabs and use layout groups where possible.

                                NOTE: if these three solutions are not suitable for performance reasons, it is recommended to profile your problematic Views as described in the How to measure and improve the application's performance article. You are also welcome to send your debuggable project along with your profiling logs so we can see other ways of making your custom app code faster in these use-case scenarios. Thanks.

                                • James Zhong 12.24.2012

                                  Thanks Konstantin for your latest information on this ticket. Currently, I had to use reflection to hack a private variable in one of your classes, to made this scenario work. When you implemented a better solution, I'll remove my current workaround from my projects.

                                • Thank you for your feedback, James.

                                If you need additional product information, write to us at or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2017 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners