public InputProviderToken(IAddInView token) { Name = token.Id; Description = token.Description; Publisher = token.Publisher; Version = token.Version; }
void loadUIAddInsMenuItem_Click(object sender, RoutedEventArgs e) { // Get add-in pipeline folder (the folder in which this application was launched from) string appPath = Environment.CurrentDirectory; // Rebuild visual add-in pipeline string[] warnings = AddInStore.Rebuild(appPath); if (warnings.Length > 0) { string msg = "Could not rebuild pipeline:"; foreach (string warning in warnings) { msg += "\n" + warning; } MessageBox.Show(msg); return; } // Load add-in with Internet zone security isolation Collection <AddInToken> addInTokens = AddInStore.FindAddIns(typeof(IAddInView), appPath); foreach (AddInToken addInToken in addInTokens) { // Get view of add-in IAddInView addInView = addInToken.Activate <IAddInView>(AddInSecurityLevel.Internet); // Store a reference to it so we can unload it later this.addInViews.Add(addInView); // Get add-in UI (passing person data to bind to FrameworkElement addInUI = addInView.GetAddInUI(this.person); // Host add-in this.addInUIStackPanel.Children.Add(addInUI); } }
public AddIn_ViewToContractAddInSideAdapter(IAddInView addInView) { this.addInView = addInView; }