以 .net 3.5 形式显示缩略图工具栏时出现问题
我正在使用 WindowsApiCodePack for windows 7 为我的表单制作缩略图工具栏。在显示的表单中,我正在执行此操作:
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);
我收到以下错误,但我不知道:
错误 1 类型“System.Windows.UIElement”是在未引用的程序集中定义的。您必须添加对程序集“PresentationCore,Version=3.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35”的引用。
我正在使用这篇文章: http://www.codeproject.com/KB/cs/EventInTime.aspx
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如消息所述,您需要添加对PresentationCore 的引用。 Windows API CodePack 需要它,但您的应用程序中未引用它。
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.