New to Telerik UI for WPF? Start a free 30-day trial
Save RadDocking Layout When the Control is Unloaded
Updated on Sep 24, 2025
Environment
| Product Version | 2022.3 912 |
| Product | RadDocking for WPF |
Description
How to save the layout of the RadDocking control when its unloaded.
Solution
-
Add a new event handler for the
Unloadedevent of theRadDockingusing theEventManager.RegisterClassHandlerstatic method.Add a new event handler for the Unloaded event of RadDocking
C#EventManager.RegisterClassHandler(typeof(RadDocking), RadDocking. UnloadedEvent, new RoutedEventHandler(OnUnloaded)); -
Implement the save logic in the newly added event handler for the
Unloadedevent.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); } } }