Using VS2012 working on a VB.NET WPF application. I have a simple MusicPlayer tutorial application that I use to learn WPF. I am converting the C # version of the tutorial to VB.NET step by step.
There are 2 classes in the application that are under the same namespace. I can reference the namespace in XAML, but when I try to reference the class object in XAML, I get an error message and I cannot compile it.
The strange thing is that IntelliSense works fine with a link to the namespace via the xmlns: c = tag, as well as when entering a class object using <c: But the object is underlined and errors are generated, trying to build or work in the designer.
Class .vb files are located in a folder named \ Controls. The main root space of the project intentionally remains empty. The class is encoded as follows:
Namespace MusicPlayer.Controls Public Class UpdatingMediaElement .... code here End Public End Namespace
xaml is as follows
(namespace defined in the <Window >
xmlns:c="clr-namespace:MusicPlayer.Controls"
(object defined in <Grid> )
<c:UpdatingMediaElement Name="MyMediaElement" />
(error displayed) The name "UpdatingMediaElement" does not exist in the namespace "clr-namespace: MusicPlayer.Controls".
Do not know what is wrong or how to fix it?
Jeff Davis Feb 02 '13 at 19:40 2013-02-02 19:40
source share