views:

37

answers:

1

Hi,

I am usign WindowsApiCodePack for windows 7 to make a thumbnail toolbar for my form. In the form shown event i am doing this:

tbButton1 = new ThumbnailToolbarButton(new Icon("myOverlayIcn.ico"), "Next Event");    
tbButton1.Click += new EventHandler<ThumbnailButtonClickedEventArgs>(button1_Click);    
tbButton2 = new ThumbnailToolbarButton(new Icon("myOverlayIcn.ico"), "Next Event");    
tbButton2.Click += new EventHandler<ThumbnailButtonClickedEventArgs>(button2_Click);    
TaskbarManager.Instance.ThumbnailToolbars.AddButtons(this.Handle, tbButton1, tbButton2);

I am getting the following error of which i have no idea:

Error 1 The type 'System.Windows.UIElement' is defined in an assembly that is not referenced. You must add a reference to assembly 'PresentationCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

I am following using this article: http://www.codeproject.com/KB/cs/EventInTime.aspx

+1  A: 

As the message states, you need to add a reference to PresentationCore. It's required by the Windows API CodePack, but not referenced in your application.

Patrick Steele
thanks, this link will helphttp://social.msdn.microsoft.com/Forums/en-US/vbide/thread/e1a26812-def5-4dc5-b667-88e8b205df56
jaminator