In WPF any UI control cannot provide a built-in functionality that automatically notifies the ViewModel when one of its events are triggered without any interaction with those event. In order to achieve this behavior you could use any of the Event to Command approaches that could be found on the web. Recently we introduced EventToCommandBehavior
that could be useful in this case. You could attached one command from your ViewModel to the Loaded
event of the RadDocking and one to the Closing
event of the MainWindow. I updated the previously attached sample project with the described approach.
The CurrentSaveLoadLayoutHelper is provided in order to be able to create a custom class that inherits the SaveLoadLayoutHelper
class and override its methods.
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>