Reputation: 3538
I have a working C# application . Into this application i need to add support of the following project link called WPF Notification . I want to use its features .
Now i have already added this project to my solution . I am unable to refer it correctly in my project . So my solution file is this
Solution
Project 1 ( My Project )
Project 2 ( WPF Project )
Trying to follow the instructions given in the link here @ Tutorial Part 1: The Basics i get an error saying that the
" The TaskbarIcon does not exist in the namespace "http://www.hardcodet.net/taskbar"
XAML CODE :
<Window x:Class="bbb"
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"
<Grid>
...
<tb:TaskbarIcon
IconSource="/Icons/Error.ico"
ToolTipText="hello world" />
</Grid>
Note : IconSource may throw an error but thats ok . Once TaskbarIcon is recognized it shall be fixed .
I am very new to C# so i am unsure how do i fix this . There may be a simple way to fix but i am unable to get it .
Upvotes: 2
Views: 1105
Reputation: 54562
I would probably just complile your WpfTaskBar project and then go to your Toolbox, right Click on it and select Choose Items, then Browse to the Directory that has the Wpf-notifyicon source. you will then need to drill down to wpf-notifyicon\NotifyIconWpf\bin\Release
and select the Hardcodet.Wpf.TaskbarNotification.dll
this will add the control to your Toolbox then you can drop it on your Window. If that is not available you will probably need to compile the wpf-notifyicon project first to generate the dll. Which in retrospect might be the issue you are currently having.
Upvotes: 3
Reputation: 918
Adding a reference to the project (as specified by @Mark Hall in the comments) would do it
Upvotes: 1