Reputation: 8866
At the start of .xaml file for a page I have:
<framework:PhoneApplicationPageBase
and in the.xaml.cs file:
public partial class MyPage : PhoneApplicationPageBase
In App.xaml I have:
<Application
...
xmlns:framework="clr-namespace:..."
but I get the error "'framework' is an undeclared prefix" when compiling the xaml file. The PhoneApplicationPageBase class is working fine in another .xaml page file (I wrote it a while ago).
Is there something I've forgotten that I need to do to make it work?
Upvotes: 0
Views: 570
Reputation: 1580
You need to declare the namespace prefix in the pages xaml file. Resources can be referenced from the App.xaml file but the imported namespaces are not propagated to the other pages in your project.
If you add xmlns:framework="clr-namespace:..." to the root element of the page it should be fine.
Upvotes: 1