I need to write some functions to be executed during the window_load() in WPF-MVVM. Every button will have their own command to be executed. Whereas is there any command available for window_load() event in MVVM Model ?
相关问题
- VNC control for WPF application
- WPF Binding from System.Windows.SystemParameters.P
- XAML: Applying styles to nested controls
- How can I add a horizontal line (“goal line”) for
- How to properly change a resource dictionary
You will have to use interactions to do that i.e to invoke command on event.
Window.Interactivity namespace has EventTrigger and InvokeCommandAction.
Don't forget that the
WindowLoaded
is a property.public ICommand WindowLoaded { get; set; }
You later have to create new RelayCommand/RoutedUICommand to actually receive the callback.
Thanks