Hi I'm trying to make a Silverlight page with an event in the ViewModel but I don't understand how to do this on the page load event (I can't find the proper command). I'd like to bind this: Loaded="RadPane_Loaded" to Loaded={Binding RadPane_Loaded}.
View:
namespace SilverlightTest.Modules.Tree
{
public partial class OutlookBarView : RadPane
{
public OutlookBarView(OutlookBarViewModel model)
{
InitializeComponent();
DataContext = model;
}
}
}
ViewModel:
namespace SilverlightTest.Modules.Tree
{
public class OutlookBarViewModel : DependencyObject
{
private IEventAggregator _eventAggregator;
private IMainPage _shell;
private IUnityContainer _container;
public OutlookBarViewModel(IEventAggregator eventAggregator, IMainPage shell, IUnityContainer container)
{
_container = container;
_eventAggregator = eventAggregator;
_shell = shell;
}
This is what I would normally do to bind something to a control.
public ICommand ExampleCommand
{
get { return (ICommand)GetValue(ExampleCommandProperty); }
set { SetValue(ExampleProperty, value); }
}
/* Here I'd like to bind the page load event but I don't understand how...? */
}
}