I am attempting to set the Name property of a Page in the constructor:
public partial class PageListView : Page
{
public PageListView(string title)
{
InitializeComponent();
Name = title;
}
}
However, I often get the following error message.
'x' is not a valid value for property 'Name'.
Where x
seems to be almost anything, drilling down into the exception details doesn't seem to provide any useful information (e.g. the InnerException is null.)
Does anyone know what is happening here?