NavigationPaneButton - IsMouseOver Changes

May 10, 2013 at 10:35 PM
Just curious as to why the NavigationPaneButton is setup to start listening for changes to its IsMouseOverProperty in the BeginInit() method as opposed to the constructor?
    public override void BeginInit()
    {
      base.BeginInit();
      DependencyPropertyDescriptor dpd = DependencyPropertyDescriptor.FromProperty(IsMouseOverProperty, typeof(ButtonBase));
      dpd.AddValueChanged(this, IsMouseOverChanged);
    }
An issue arises when a NavigationPaneButton is instantiated through code, and not through Xaml. When instantiaed in code, the BeginInit method is not called automatically, and therefore the mouseover / displaystate never gets updated properly.

Just wondering if there was any reasoning to putting the AddValueChanged code in the BeginInit method as opposed to the constructor?
I've moved the