I am quite new to WPF and am having a hard time with an annoying error message. Here are my steps:
Create a new WPF application in Visual Studio 2015. This is the default xaml that is generated for
MainWindow
(this works fine):<Window x:Class="Skype_Utility.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:Skype_Utility" Title="MainWindow" Height="300" Width="300"> <Grid> </Grid> </Window>
Notice the first 2 lines:
<Window x:Class="Skype_Utility.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
Next, I grabbed some xaml from here, because I am trying to add an auto-complete textbox to the project:
<Window x:Class="Skype_Utility.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml " xmlns:ac="clr-namespace:WpfAutoComplete.Controls;assembly=WpfAutoComplete" Title="Autocomplete Text Box Project" Height="300" Width="300"> <Grid> <StackPanel> <Label Content="This is an Autocomplete Textbox" /> <ac:TextBoxAutoComplete Name="autoTxtBoxEng" SearchDataProvider="{Binding Path=MySearchProviderEng}" SelectedListBoxValue="{Binding Path=PhraseNumber, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" WatermarkText="Type in filtering text here..."/> </StackPanel> </Grid> </Window>
However, when I place their xaml into my project, I get this error message:
The property "Class" does not exist in the "http://schemas.microsoft.com/winfx/2006/xaml " namespace.
Even though those are the exact same lines present in the default code, and there was no error given then...
How can Visual studio complain about this line even though it is literally exactly the same as the first couple of lines that were auto-generated? I have no clue how to progress with this and would really appreciate any advice!
My only thoughts on this really are that there must be some line occurring after the warning which is causing this, but in that case it is a very unhelpful error message!
I am unable to build or run my project due to the errors present:
The name "TextBoxAutoComplete" does not exist in the namespace "clr-namespace:WpfAutoComplete.Controls;assembly=WpfAutoComplete".
The property "Class" does not exist in the "http://schemas.microsoft.com/winfx/2006/xaml " namespace.
The property 'Class' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml '.
WpfAutoComplete
, but it still complains about theClass
property, which seems ridiculous ... – Bassie