I thought it would be something like the loaded event but that appears to not be the case. Please advise, thanks.
public partial class Menu : RadPane
{
public Menu()
{
InitializeComponent();
DataContext = new MenuViewModel(mc);
Loaded += Menu_Loaded; //breakpoint here executes
}
void Menu_Loaded(object sender, RoutedEventArgs e)
{
Loaded -= Menu_Loaded; // never executes
((MenuViewModel)DataContext).ShowMenu();
}
protected override void OnLoaded(object sender, RoutedEventArgs e)
{
base.OnLoaded(sender, e); // never executes
((MenuViewModel)DataContext).ShowMenu();
}
}
public partial class Menu : RadPane
{
public Menu()
{
InitializeComponent();
DataContext = new MenuViewModel(mc);
Loaded += Menu_Loaded; //breakpoint here executes
}
void Menu_Loaded(object sender, RoutedEventArgs e)
{
Loaded -= Menu_Loaded; // never executes
((MenuViewModel)DataContext).ShowMenu();
}
protected override void OnLoaded(object sender, RoutedEventArgs e)
{
base.OnLoaded(sender, e); // never executes
((MenuViewModel)DataContext).ShowMenu();
}
}