New to Telerik UI for WPFStart a free 30-day trial

Save RadDocking Layout When the Control is Unloaded

Updated on Sep 24, 2025

Environment

Product Version2022.3 912
ProductRadDocking for WPF

Description

How to save the layout of the RadDocking control when its unloaded.

Solution

  1. Add a new event handler for the Unloaded event of the RadDocking using the EventManager.RegisterClassHandler static method.

    Add a new event handler for the Unloaded event of RadDocking

    C#
        EventManager.RegisterClassHandler(typeof(RadDocking), RadDocking.   UnloadedEvent, new RoutedEventHandler(OnUnloaded));
  2. Implement the save logic in the newly added event handler for the Unloaded event.

    Sample implementation of saving the layout in the newly added handler

    C#
        private void OnUnloaded(object sender, RoutedEventArgs e)
        {
            using (IsolatedStorageFile storage = IsolatedStorageFile.   GetUserStoreForAssembly())
            {
                using (var isoStream = storage.OpenFile("RadDocking_Layout.xml",    FileMode.Create))
                {
                    this.radDocking.SaveLayout(isoStream);
                }
            }
        }
In this article
EnvironmentDescriptionSolution
Not finding the help you need?
Contact Support