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
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