Hello there,
I have a little problem with using a non-standard user control in my existing WPF project, not critical, but very annoying. I'm trying to use the
WPF NotifyIcon[
^] by Philipp Sumi in my WPF project. I added a reference, added the namespace in XAML and C#, but the designer doesn't recognize the type. If I compile or debug, however, everything seems to work fine and I can use the control just as it was intended.
This leaves me with a working control that's just hard to use, since I can't take advantage of IntelliSense in the XAML code. Oddly enough, it doesn't even recognize my local type and gives me the same error message about a not found type and a missing assembly as the one I get with the TaskbarIcon.
I tried taking the same steps in a new project, without doing anything else before, and it worked, so I'm baffled why it behaves differently in two different projects (both target .NET 3.5, if that's important). Maybe someone can give me a hint on how to make this work? I have
using Hardcodet.Wpf.TaskbarNotification;
in my C#, and here is what my XAML looks like. If you need anything else to see what's going on, please ask.
<<Window x:Class="ASM_Informer.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:tb="http://www.hardcodet.net/taskbar"
xmlns:local="clr-namespace:ASM_Informer.UI"
Title="MainWindow" Height="Auto" Width="Auto">
<Grid>
<tb:TaskbarIcon x:Name="tb" ToolTipText="hello world">
<tb:TaskbarIcon.TrayPopup>
<local:DispoRMUC/>
</tb:TaskbarIcon.TrayPopup>
</tb:TaskbarIcon>
</Grid>
</Window>
TaskbarIcon and DispoRMUC (my own user control that is found in the UI namespace) are the types that the designer apparently can't find and that show the error message.
I'm using the German version of Visual Studio 2010 (Professional), so I only have the German error message ("Fehler - Der tb:TaskbarIcon-Typ wurde nicht gefunden. Alle Assemblyverweise müssen vorhanden sein, und alle Assemblys, auf die verwiesen wird, müssen erstellt worden sein."), so I'll roughly translate: "Error - the tb:TaskbarIcon-type was not found. All assembly references must exist and all referenced assemblies must have been built.".
Many thanks in advance for anyone who takes the time to look into this. I hope someone can help me with this.