Reputation: 780
Good morning guys, I have a little problem.
has a class called "SettingsPage" which extends "PageBase". PageBase "in turn extends both" IPageBase "and" Page ".
When in the graphics page of "SettingsPage" (Xaml) I specify that it is of type PageBase this gives me error.
The error says that "PageBase" does not exist in the same context but the name space is the same.
I put you below the classes competes
PageBase.cs
namespace EVS.Pages
{
public class PageBase : Page, IPagebase
{
string IPagebase.Title => "No Title";
}
public interface IPagebase
{
String Title { get; }
}
}
SettingsPage.xaml.cs
namespace EVS.Pages
{
public sealed partial class SettingsPage : PageBase
{
string Title => "Settings";
public SettingsPage()
{
this.InitializeComponent();
}
}
}
SettingsPage.xaml
<local:PageBase
x:Class="EVS.Pages.SettingsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:EVS.Pages"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<TextBlock>Test</TextBlock>
</Grid>
</local:PageBase>
thanks in advance, at your disposal for further clarification
Upvotes: 0
Views: 44
Reputation: 39102
This may happen because of some temporary files that are left out in the obj
and bin
folders of the project.
Click Clean Solution
in the Build
menu and then close Visual Studio and delete the obj
and bin
folders in the project folder.
Upvotes: 1