Problem showing thumbnail toolbar in .net 3.5 form

折月煮酒 提交于 2019-12-02 05:34:56

问题


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:


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.



来源:https://stackoverflow.com/questions/3519181/problem-showing-thumbnail-toolbar-in-net-3-5-form

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!