
Hi,
In Silverlight I believe the RadTabControl will lazily load the content of a RadTabControl when the RadTabItems are declared in the Xaml. In WPF I seems to eager load all the items on loading the control. Is it possible to configure the RadTabControl to only instantiate the RadTabItem content when the tab is selected to improve performance?
Thanks
1 Answer, 1 is accepted
Hello Scott,
All tab item contents in the RadTabControl are read by the XAML parser in case they are defined in XAML. However, the only the selected tab's content will be added into the visual tree. Then when you select another tab, the previously selected content is removed from the visual tree and the new one is added. You can change this behavior using the IsContentPreserved property of the control. In this case, the contents are added to the visual tree on the first selection of the corresponding tab and then only their Visibility changes.
There is no option to change the default loading of the XAML defined contents. What you can try for the performance optimization is to set the SupressSelectedContentTemplateReapplying property of the RadTabControl to True.
Regards,
Martin Ivanov
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Demurrage.dll!Demurrage.Claim.InterfaceMessagesViewModel.InterfaceMessagesViewModel(Demurrage.ViewModels.ClaimSummaryViewModel claimSummaryViewModel) Line 19 C#
> Demurrage.dll!Demurrage.ViewModels.ClaimSummaryViewModel.InterfaceMessagesViewModel.get() Line 1138 C#
[Native to Managed Transition]
[Managed to Native Transition]
PresentationFramework.dll!MS.Internal.Data.PropertyPathWorker.GetValue(object item, int level) Unknown
PresentationFramework.dll!MS.Internal.Data.PropertyPathWorker.RawValue(int k) Unknown
PresentationFramework.dll!MS.Internal.Data.PropertyPathWorker.RawValue() Unknown
PresentationFramework.dll!MS.Internal.Data.ClrBindingWorker.RawValue() Unknown
PresentationFramework.dll!System.Windows.Data.BindingExpression.TransferValue(object newValue, bool isASubPropertyChange) Unknown
PresentationFramework.dll!System.Windows.Data.BindingExpression.Activate(object item) Unknown
PresentationFramework.dll!System.Windows.Data.BindingExpression.AttachToContext(System.Windows.Data.BindingExpression.AttachAttempt attempt) Unknown
PresentationFramework.dll!System.Windows.Data.BindingExpression.MS.Internal.Data.IDataBindEngineClient.AttachToContext(bool lastChance) Unknown
PresentationFramework.dll!MS.Internal.Data.DataBindEngine.Task.Run(bool lastChance) Unknown
PresentationFramework.dll!MS.Internal.Data.DataBindEngine.Run(object arg) Unknown
PresentationFramework.dll!MS.Internal.Data.DataBindEngine.OnLayoutUpdated(object sender, System.EventArgs e) Unknown
PresentationCore.dll!System.Windows.ContextLayoutManager.fireLayoutUpdateEvent() Unknown
PresentationCore.dll!System.Windows.ContextLayoutManager.UpdateLayout() Unknown
PresentationCore.dll!System.Windows.ContextLayoutManager.UpdateLayoutCallback(object arg) Unknown
PresentationCore.dll!System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork() Unknown
PresentationCore.dll!System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() Unknown
PresentationCore.dll!System.Windows.Media.MediaContext.RenderMessageHandlerCore(object resizedCompositionTarget) Unknown
PresentationCore.dll!System.Windows.Media.MediaContext.RenderMessageHandler(object resizedCompositionTarget) Unknown
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) Unknown
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler) Unknown
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl() Unknown
WindowsBase.dll!MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(object obj) Unknown
System.Private.CoreLib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown
WindowsBase.dll!MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke() Unknown
WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue() Unknown
WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Unknown
WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Unknown
WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) Unknown
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) Unknown
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler) Unknown
WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs) Unknown
WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) Unknown
[Native to Managed Transition]
[Managed to Native Transition]
WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame) Unknown
WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame frame) Unknown
WindowsBase.dll!System.Windows.Threading.Dispatcher.Run() Unknown
PresentationFramework.dll!System.Windows.Application.RunDispatcher(object ignore) Unknown
PresentationFramework.dll!System.Windows.Application.RunInternal(System.Windows.Window window) Unknown
PresentationFramework.dll!System.Windows.Application.Run() Unknown
Demurrage.dll!Demurrage.App.Main() Unknown