//The event is triggered the first time the activity is drag-dropped on the designer surface. Changing the contents of the Toolbox accordingly protected override void OnModelItemChanged(object newItem) { this.ModelItem.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(ModelItem_PropertyChanged); base.OnModelItemChanged(newItem); if (toolboxService == null) { toolboxService = (System.Activities.Presentation.IActivityToolboxService)this.Context.Services.GetService(typeof(System.Activities.Presentation.IActivityToolboxService)); } toolboxService.AddCategory("New WF Category"); toolboxService.AddItem(itemQualifiedName, itemCategoryName); }
//The event is triggered the first time the activity is drag-dropped on the designer surface. Changing the contents of the Toolbox accordingly protected override void OnModelItemChanged(object newItem) { this.ModelItem.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(ModelItem_PropertyChanged); base.OnModelItemChanged(newItem); if (toolboxService == null) { toolboxService = (System.Activities.Presentation.IActivityToolboxService) this.Context.Services.GetService(typeof(System.Activities.Presentation.IActivityToolboxService)); } toolboxService.AddCategory("New WF Category"); toolboxService.AddItem(itemQualifiedName, itemCategoryName); }