I have created a Base class like this:
`namespace XXX.Screens
{
public partial class Settings_screen_BASE : PhoneApplicationPage
{
public static readonly bool DEBUG = true;
public Settings_screen_BASE()
{
if (DEBUG)
Debug.WriteLine(this.GetType() + "->" + System.Reflection.MethodBase.GetCurrentMethod().Name);
InitializeComponent();
if (DEBUG)
Debug.WriteLine(this.GetType() + "<-" + System.Reflection.MethodBase.GetCurrentMethod().Name);
}
}
}`
And this child class:
namespace XXX.Screens
{
public partial class Settings_screen_Child : Settings_screen_BASE
{
public Settings_screen_Child()
{
if (DEBUG)
Debug.WriteLine(this.GetType() + "->" + System.Reflection.MethodBase.GetCurrentMethod().Name);
base.InitializeComponent();
if (DEBUG)
Debug.WriteLine(this.GetType() + "<-" + System.Reflection.MethodBase.GetCurrentMethod().Name);
}
}
}
When I now call:
this.NavigationService.Navigate(new Uri("/Screens/Settings_screen_BASE.xaml", UriKind.Relative));
It works well,
but when I call
this.NavigationService.Navigate(new Uri("/Screens/Settings_screen_Child.xaml", UriKind.Relative));
I just get a black screen and the debug output does not show any creation of the child class.
Can you please tell me what I am missing here?
I would have expected that calling the child would do exactly the same as calling the base class.
At least it should call Settings_screen_Child()