Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • In the 17.1 version, we have improved the scenario of loading ASPxPageControl tab content when WebLayoutManager.DelayedItemsInitialization equals true and the Conditional Appearance module is involved:
                                    ConditionalAppearance - How to avoid not fully initialized layout tab content when using Appearance rules with ViewItemVisibility.Hide on the Web. There are also several breaking changes in the initialization and usage of LayoutItemTemplateContainerBase descendants.

                                    - If custom templates are used for laying out controls (only LayoutGroupTemplate and TabbedGroupTemplate descendants), it is necessary to call the LayoutItemTemplateContainerBase.Instantiate() method before adding LayoutItemTemplateContainerBase descendants if WebLayoutManager.DelayedItemsInitialization equals true. For example:

                                    [C#]
                                    public class CustomLayoutGroupTemplate : LayoutGroupTemplate {     protected override void LayoutContentControls(LayoutGroupTemplateContainer layoutGroupTemplateContainer, IList<Control> controlsToLayout) {         foreach(Control control in controlsToLayout) {             LayoutItemTemplateContainerBase templateContainer = control as LayoutItemTemplateContainerBase;             if(templateContainer != null && templateContainer.LayoutManager.DelayedItemsInitialization) {                 templateContainer.Instantiate();             }             layoutGroupTemplateContainer.Controls.Add(control);         }     } }

                                     

                                    [VB.NET]
                                    Public Class CustomLayoutGroupTemplate Inherits LayoutGroupTemplate Protected Overrides Sub LayoutContentControls(layoutGroupTemplateContainer As LayoutGroupTemplateContainer, controlsToLayout As IList(Of Control)) For Each control As Control In controlsToLayout Dim templateContainer As LayoutItemTemplateContainerBase = TryCast(control, LayoutItemTemplateContainerBase) If templateContainer IsNot Nothing AndAlso templateContainer.LayoutManager.DelayedItemsInitialization Then templateContainer.Instantiate() End If layoutGroupTemplateContainer.Controls.Add(control) Next End Sub End Class



                                    - If a LayoutItemTemplateContainer is created in the WebLayoutManager descendant, then it is necessary to set the LayoutItemTemplateContainer.ViewItem and LayoutItemTemplateContainer.Template properties. For example:

                                    [C#]
                                    public class CustomWebLayoutManager : WebLayoutManager {     protected override LayoutItemTemplateContainer LayoutItem(ViewItemsCollection viewItems, IModelLayoutViewItem layoutItemModel) {         LayoutItemTemplateContainer templateContainer = new LayoutItemTemplateContainer(this, viewItems, layoutItemModel);         templateContainer.ViewItem = viewItems[layoutItemModel.ViewItem.Id];         templateContainer.Template = LayoutItemTemplate;         ...         return templateContainer;     } }

                                     

                                    [VB.NET]
                                    Public Class CustomWebLayoutManager Inherits WebLayoutManager Protected Overrides Function LayoutItem(viewItems As ViewItemsCollection, layoutItemModel As IModelLayoutViewItem) As LayoutItemTemplateContainer Dim templateContainer As New LayoutItemTemplateContainer(Me, viewItems, layoutItemModel) templateContainer.ViewItem = viewItems(layoutItemModel.ViewItem.Id) templateContainer.Template = LayoutItemTemplate ... Return templateContainer End Function End Class



                                    - If a LayoutGroupTemplateContainer is created in the WebLayoutManager descendant, then it is necessary to set the LayoutGroupTemplateContainer.Template property. For example:

                                    [C#]
                                    public class CustomWebLayoutManager : WebLayoutManager {     protected override LayoutGroupTemplateContainer ProcessStandardGroup(ViewItemsCollection viewItems, IModelLayoutGroup layoutGroupModel) {         ImageInfo headerImageInfo = ImageLoader.Instance.GetImageInfo(layoutGroupModel.ImageName);         LayoutGroupTemplateContainer templateContainer = new LayoutGroupTemplateContainer(this, viewItems, layoutGroupModel, headerImageInfo);         templateContainer.Template = LayoutGroupTemplate;         ...         return templateContainer;     } }

                                     

                                    [VB.NET]
                                    Public Class CustomWebLayoutManager Inherits WebLayoutManager Protected Overrides Function ProcessStandardGroup(viewItems As ViewItemsCollection, layoutGroupModel As IModelLayoutGroup) As LayoutGroupTemplateContainer Dim headerImageInfo As ImageInfo = ImageLoader.Instance.GetImageInfo(layoutGroupModel.ImageName) Dim templateContainer As New LayoutGroupTemplateContainer(Me, viewItems, layoutGroupModel, headerImageInfo) templateContainer.Template = LayoutGroupTemplate ... Return templateContainer End Function End Class



                                    - If a TabbedGroupTemplateContainer is created in the WebLayoutManager descendant, then it is necessary to set the TabbedGroupTemplateContainer.Template property. For example:

                                    [C#]
                                    public class CustomWebLayoutManager : WebLayoutManager {     protected override TabbedGroupTemplateContainer ProcessTabbedGroup(ViewItemsCollection viewItems, IModelTabbedGroup layoutGroupModel) {         TabbedGroupTemplateContainer templateContainer = new TabbedGroupTemplateContainer(this, viewItems, layoutGroupModel);         templateContainer.Template = TabbedGroupTemplate;         ...         return templateContainer;     } }

                                     

                                    [VB.NET]
                                    Public Class CustomWebLayoutManager Inherits WebLayoutManager Protected Overrides Function ProcessTabbedGroup(viewItems As ViewItemsCollection, layoutGroupModel As IModelTabbedGroup) As TabbedGroupTemplateContainer Dim templateContainer As New TabbedGroupTemplateContainer(Me, viewItems, layoutGroupModel) templateContainer.Template = TabbedGroupTemplate ... Return templateContainer End Function End Class

                                0 Solutions

                                Creation Date Rating Importance Sort by

                                If you need additional product information, write to us at info@devexpress.com 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