Reputation: 269
I converted my Windows 8.1 app to UWP app. After this I can't use my xaml designer any more in Visual Studio 2015 Update 1. I always got the error: The name "Classname" does not exist in the namespace "using:company.name.app".I got this error on all pages and with different classes. But if I compile the app is running.
What I do:
but it didn't solve the problem?
<Page x:Name="pageRoot"
x:Class="company.name.app.MainItemsPage"
DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:common="using:company.name.app">
<Page.Resources>
<common:Time x:Key="timeSource"/>
<common:Weather x:Key="weatherSource"/>
</Page.Resources>
And the class in the same namespace:
namespace company.name.app {
public partial class Time : INotifyPropertyChanged {
private readonly DispatcherTimer timer = new DispatcherTimer();
private string resDateTime;
public string ResDateTime {
get {
return resDateTime;
}
set {
resDateTime = value;
NotifyPropertyChanged("ResDateTime");
}
}
public event PropertyChangedEventHandler PropertyChanged;
public void NotifyPropertyChanged(string propertyName) {
if (PropertyChanged != null) {
PropertyChanged(this,
new PropertyChangedEventArgs(propertyName));
}
}
public Time() {
timer.Tick += TimerOnTick;
timer.Start();
}
}
}
Upvotes: 0
Views: 162
Reputation: 81
Its difficult for us to say from the information above, if you could share more of the project we can try to assists. The best guess is you have an implicit assembly reference somewhere that the designer can’t resolve.
Upvotes: 2