So When I get to the end of this example on p.184, I get 2 exceptions in the Addin.cs file. I get the exception encased in ***'s.
private void ThisAddIn_Startup(object sender, System.EventArgs e)
***ctp = this.CustomTaskPanes.Add(ctrl, ctrlTitle);***
ctp.Visible = true;
ctp.DockPosition = Microsoft.Office.Core.MsoCTPDockPosition.msoCTPDockPositionRight;
The best overloaded method match for 'Microsoft.Office.Tools.CustomTaskPaneCollection.A dd(System.Windows.Forms.UserControl, string)' has some invalid arguments
Argument 1: cannot convert from 'ProductsList.XAMLHost' to 'System.Windows.Forms.UserControl'
ALSO, I'm having trouble with The UserControl1.xaml.cs file. A BUNCH of methods and components "Do not exist in the current context" as soon as I add the XAMLHost.xaml file to the project. Where before I added it to the project I wasn't having any issues.
These include the following:
The name "InitializeComponent does not exist in the current context
private void lstBxProducts_SelectionChanged(object sender, SelectionChangedEventArgs e)
string strSelectedProd = lstBxProducts.SelectedItem.ToString();
The name 'lstBxProducts does not exist in the current context
foreach (var d in products)
txtbxSku.Text = d.productSKU;
txtbxPrice.Text = d.productPrice;
The name 'txtbxSku' does not exist in the current context.
The name 'txtbxPrice' does not exist in the current context.