EDIT:
Here are the pastebins for the code:
BasicPage1.xaml.cs
BasicPage1.xaml
LayoutAwarePage.cs
EDIT 2
I have added a MS Connect ticket here:
https://connect.microsoft.com/VisualStudio/feedback/details/771648/c-xaml-compile-error-various-errors-the-name-layoutawarepage-does-not-exist#tabs
Right a head scratcher which I'm hoping others have experienced and know how to resolved as I'm a little disheartened by the whole affair.
The Problem
I have been working on a Windows Store App using C#/XAML to learn the ropes. After hours spent learning I decided to start my own App, which is fine. The issue is, after adding a few Views etc, I started getting the following error within my XAML files (All of them):
Error 5 The name "LayoutAwarePage" does not exist in the namespace "using:Accountable.Common". G:\Coding Projects\Visual Studio 2012\SAVED\Accountable\Accountable\BasicPage1.xaml 1 1 Accountable
Which is strange because the Accountable.Common is declared within the XAML file:
<common:LayoutAwarePage
x:Name="pageRoot"
x:Class="Accountable.BasicPage1"
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:local="using:Accountable"
xmlns:common="using:Accountable.Common"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
So i read here that closing the XAML files down and closing Visual Studio 2012 and re-opening, plus Building, resolves this issue. It didnt. It now causes the following errors within the Common files created when you first create new templates:
Error 1 'Accountable.Common.BooleanNegationConverter' does not implement interface member 'Windows.UI.Xaml.Data.IValueConverter.ConvertBack(object, System.Type, object, string)' G:\Coding Projects\Visual Studio 2012\SAVED\Accountable\Accountable\Common\BooleanNegationConverter.cs 9 25 Accountable
Error 2 'Accountable.Common.BooleanNegationConverter' does not implement interface member 'Windows.UI.Xaml.Data.IValueConverter.Convert(object, System.Type, object, string)' G:\Coding Projects\Visual Studio 2012\SAVED\Accountable\Accountable\Common\BooleanNegationConverter.cs 9 25 Accountable
Error 3 'Accountable.Common.BooleanToVisibilityConverter' does not implement interface member 'Windows.UI.Xaml.Data.IValueConverter.ConvertBack(object, System.Type, object, string)' G:\Coding Projects\Visual Studio 2012\SAVED\Accountable\Accountable\Common\BooleanToVisibilityConverter.cs 20 25 Accountable
Error 4 'Accountable.Common.BooleanToVisibilityConverter' does not implement interface member 'Windows.UI.Xaml.Data.IValueConverter.Convert(object, System.Type, object, string)' G:\Coding Projects\Visual Studio 2012\SAVED\Accountable\Accountable\Common\BooleanToVisibilityConverter.cs 20 25 Accountable
I haven't changed BooleanNegationConverter.cs or BooleanToVisibility.cs. What have i done to try and resolved the issue:
I'm completely at a loss. I have created a new Project and the problem doesn't exist. I dont really want to start my Project again!
FYI - LayoutPageAware.cs is included in the Project:
C programming language is a machine-independent programming language that is mainly used to create many types of applications and operating systems such as Windows, and other complicated programs such as the Oracle database, Git, Python interpreter, and games and is considered a programming foundation in the process of ...
In the real sense it has no meaning or full form. It was developed by Dennis Ritchie and Ken Thompson at AT&T bell Lab. First, they used to call it as B language then later they made some improvement into it and renamed it as C and its superscript as C++ which was invented by Dr.
Compared to other languages—like Java, PHP, or C#—C is a relatively simple language to learn for anyone just starting to learn computer programming because of its limited number of keywords.
C is more difficult to learn than JavaScript, but it's a valuable skill to have because most programming languages are actually implemented in C. This is because C is a “machine-level” language. So learning it will teach you how a computer works and will actually make learning new languages in the future easier.
I believe that the LayoutAwarePage
is defined in the Common folder, and is automatically generated the first time you create a Basic Page
You might get a dialog saying
"This addition depends on files that are missing from your project. Without these files you must resolve dependencies on the Common namespace manually. Add the missing files automatically?"
click yes
and then try building again
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With