Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning SharePoint 2010 Development
This is the forum to discuss the Wrox book Beginning SharePoint 2010 Development by Steve Fox; ISBN: 978-0-470-58463-7
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning SharePoint 2010 Development section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old February 1st, 2011, 03:02 PM
Authorized User
Join Date: Jun 2007
Location: , , .
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
Arrow Chapter 5 P184

The book advises that following code is added to "ThisAddIn"

XAMLHost ctrl = new XAMLHost();
string ctrlTitle = "Product Data";
Office.CustomTaskPane ctp;

private void ThisAddIn_Startup(object sender, System.EventArgs e)
ctp = this.CustomTaskPanes.Add(ctrl, ctrlTitle);
ctp.Visible = true;
ctp.DockPosition = Microsoft.Office.Core.MsoCTPDockPosition.msoCTPDoc kPositionRight;

When I tried this I got the follwoing error.

The best overloaded method match for 'Microsoft.Office.Tools.CustomTaskPaneCollection.A dd(System.Windows.Forms.UserControl, string)' has some invalid arguments

Anyone else got this error.

Any help would be appreciated.

Reply With Quote
  #2 (permalink)  
Old June 20th, 2011, 06:42 PM
Registered User
Join Date: Jun 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Answer?

Is there an answer to this question?

The Office.CustomTaskPane will not take a XAMLHost control as a parameter. It will only take a Windows.Forms.UserControl.

Is there an errata page or code update?

Please let me know.

Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 6 - Code Download Missing for this Chapter dbaechtel BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 0 August 11th, 2009 11:02 AM
Chapter 2 - End of chapter exercises whizzkid1892 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 July 30th, 2008 12:02 PM
Generics chapter 12 difficult chapter i found ...? Larryz C# 2005 1 July 4th, 2007 09:40 PM

All times are GMT -4. The time now is 06:39 AM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.