.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Custom Activity designer in VS

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :JQuery


My custom Activity has designer that relies on external service.

In re-hosted environment I register the service right after WorkflowDesigner is created :

 _workflowDesigner.Context.Services.Publish<IMyService> ( _service);

The question is how do I tell VS to publish my service? (service class name, constructor arguments...)


View Complete Post

More Related Resource Links

How to display breakpoint and debug visual cues with custom activity designer based on WorkflowViewE

Hi,   I am developing custom activity designers based on "WorkflowViewElement" instead of "ActivityDesigner" in my xaml. It allows me to have greater control of the look and feel of the designer. However I noticed that with this approach, the breakpoint visual cue (Dark red solid circle that appears on the left side of the designer when you set breakpoint on the designer) is not visible. It works fine when you write your designed based on "ActivityDesigner". The same behavior happens to the debug visual cue when you debugging the WF. It appears as bright yellow rectangle surrounding the activity designer if you are based on "ActivityDesigner", but it is not available when your designer is based on"WorkflowViewElement". Any help is highly appreciated. Li

Custom designer for a Flowchart activity?

Can anyone point me in the right direction for developing a custom designer for a Flowchart activity?  In actual fact, the Flowchart control we are using is a custom activity - it's not the regular .NET Flowchart activity, but our own creation with a collection for FlowNodes/etc.  We'd like to put a UI around it now as well ... mimicking the .NET Fllowchart designer.  Is that really possible, or extremely difficult?  It seems there's no real API or anything available for constructing the node connectors, arrows, etc.

the joy of writing a custom workflow activity for SharePoint Designer...


So, I need an activity that will replace some old text into new text in a given string.
Not present OOTB in SharePoint Designer, so - oh boy! oh boy! - we can develop it ourselves using Visual Studio!

Ok great, I did some reading about it on SP2007 in the past, but never needed it, so never actually tried it.
Now I'm on SP2010, so I googled again to find guides on how to write my very first custom workflow activity to use in SharePoint Designer 2010.
Nothing to be found.... The few posts about 2010 were only stating that it works still the same as in SP2007, and to look for guides on 2007.

Ok, so I googled some guides on how to do this in SP2007. I found one from MSDN, perfect to start with you'd say: http://msdn.microsoft.com/en-us/library/cc627284.aspx 
But really, it doesn't work the same... When I create an Activity Library project in VS2010, I don't have a class, like in the guide. All I have is a xaml file, no cs at all, and I have absolutely no clue what I should add in order to get the same class as in the guide. Adding a regular class is not it, since in the guide they're using a partial class. So I'm blocked 5secs after I started reading the guide... just great.

I'm so fed up with the lack of information on development for SharePoint. I hit

How to drop Activities in Custom Activity Designer having custom style template?



I have designed a custom activity designer developed using Activity Designer XAML and using that in a rehosted Workflow environment on a WPF. I have changed the outer design of the Activity designer by setting the style template to my required style. If I do this, I am unable to add the activities to the custom activity having my custom activity designer.

Am I missing anything.? Please help me in this regard.

Thanks in advance,



Is there a plan to support a custom activity type as a root document in xaml on VS workflow designer



Referring to the post below. It seems that the current VS workflow designer only support "Activity" type as a root document. Is there a plan to support a custom activity type as a root document in xaml on next release of WF?




How to get a list of unkown number of Object from a custom Activity Designer



I'm  trying to get a list of Object of unknown size. I use a stackpanel in my designer to have as many ExpressionTextBox as needed. The number is only known at design time through an ExpressiontTextBox and a validate button. Once the button is clicked, I generate the ExpressionTextBoxes as follow :

    Private Sub btnValidate_Click(ByVal sender As System.Object,
                                  ByVal e As System.Windows.RoutedEventArgs)
      stack.Children.RemoveRange(0, stack.Children.Count)
      For i As Integer = 0 To (

Custom Workflow Activity Designer Serialization Issues


I have an activity which has collection properties as below


    public sealed class TaskActivity : NativeActivity
        public TaskActivity()
            TaskParameters = new ObservableCollection<PMTaskParameter>();
            TaskExceptions = new ObservableCollection<Guid>();

Argument validation in custom activity designer


I am having problems getting validation to work properly in the designer for my custom activity. The simplest sample to reproduce the behavior is as follows:

I have a custom WF4 activity with a dynamic collection of arguments stored in a dictionary:

public class DictionaryActivity : NativeActivity
  public Dictionary<string, InArgument> Arguments { get; set; }
  public InArgument<string> StringArg { get; set; }

  public DictionaryActivity()
    Arguments = new Dictionary<string, InArgument>();

  protected override void Execute(NativeActivityContext context)
  { }

In the designer I dinamically crea

Smart Tags: Simplify UI Development with Custom Designer Actions in Visual Studio


Windows Forms 2.0 components expose smart tags by utilizing Designer Actions. By taking advantage of this feature, you can add smart tags to your own custom components to make setting their properties and other actions much easier and developer-friendly.

Michael Weinhardt

MSDN Magazine July 2005

.NET Internals: Tailor Your Application by Building a Custom Forms Designer with .NET


The design-time architecture of Windows Forms in the .NET Framework has made development much more flexible than it had been with MFC. With Windows Forms, you can drag one of your custom controls from the toolbox and drop it onto the Visual Studio design surface and even though Windows Forms knows nothing about the control, it's able to host it and let you manipulate its properties-not possible in MFC. In this article, the author discusses what's going on under the covers as you design your forms and then walks through the creation of a bare-bones forms designer.

Sayed Y. Hashimi

MSDN Magazine December 2004

SharePoint Designer: insert custom list not working anymore



Suddenly sharepoint designer decided today that it doesn't want to insert a custom list form anymore...
To be more specific, it doesn't work anymore in a site that uses the Microsoft budgeting and tracking template. In a website that uses an out of the box template, it still works.

It did work before, because I did it in other websites using the same template (it's broken there as well now).

Why oh why does SharePoint refuse to do this now?
I searched google and here on the forums, but all I could find was some issues after installing SP1, but we did that already long time ago and it was still working after that. I checked with our infrastructure guys and they didn't install new updates they say.

I also tried the solutions listed here: http://blogs.msdn.com/spdsupport/archive/2008/07/03/how-to-fix-custom-list-forms-will-not-insert-or-show-up-on-the-design-surface-of-sharepoint-designer.aspx
But they don't fix the problem.

So my problem is, I can go to Insert > SharePoint Controls > Custom List Form
I pick my list, content type and form type, I hit OK and... nothing happens.

Custom Editform.aspx crashes Sharepoint Designer

Hi there,

I've recently designed a sharepoint list and customised newform.aspx and editform.aspx. I made copies of the originals then customised the copies.
On both forms I simply:

* Closed original List Form web part
* Added Custom List Form
* Added some section breaks (<tr>) to the form to break it into sections
* Added a new css style to change the background colour on the section breaks (table rows)

Now NewForm.aspx works fine. However after making above changes in EditForm.aspx, I saved it. However whenever I try to reopen EditForm.aspx in Sharepoint Designer (SD), SD crashes! I can only open it in Text view. The error details reported by SD are:

Problem signature:
  Problem Event Name:    APPCRASH
  Application Name:    SPDESIGN.EXE
  Application Version:    12.0.6423.1000
  Application Timestamp:    49b09947
  Fault Module Name:    FPEDITAX.DLL
  Fault Module Version:    12.0.6423.1000
  Fault Module Timestamp:    49b098d3
  Exception Code:    c0000005
  Exception Offset:    0010b35c
  OS Version:    6.0.6002.
  Locale ID:    3081

Additional information about the problem:
  LCID:    1033
  Brand:    Office12Crash
  skulcid:    1033

I really don't know why SD is crashing. As a test I made a new

Problem with SharePoint Designer 2007 and Custom List Forms


I created several forms (Create/Edit/View) for a SharePoint list, using Custom List Forms.  I'm using Content Types in the list to ensure that each item only has the necessary fields.  When I created the ASPX forms, and inserted the Custom List Forms, I selected the correct Content Type, and I got the right fields inserted in the form.

Now, for some reason I can't identify, every time I create a new form, and insert a Custom List Form, SPD is bringing ALL fields from the list, instead of just bringing the fields included in the selected Content Type.

I have tried many different things to solve the problem, including creating new lists/content types/forms, etc. but SPD is doing the same thing all the time.

Can somebody tell me what may have gone wrong in SPD or MOSS?


VS2010 designer problems with custom markup extensions returning FontFamily

App.xaml: <Application x:Class="CustomMarkup.App"              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"              xmlns:int="clr-namespace:CustomMarkup"              xmlns:ext="clr-namespace:ExternalMarkupExt;assembly=ExternalMarkupExt"              StartupUri="MainWindow.xaml">     <Application.Resources>         <Style x:Key="MyStyle">             <Setter                  Property="Control.FontFamily"                  Value="{ext:ExtMarkupExt {x:Static int:Resources.FONTFAMILY_NAME}}"/>         </Style>     </Application.Resources> </Application> MainWindow: <Window x:Class="CustomMarkup.MainWindow"         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"         xmlns:x=&quo

Creating a Validator class for a custom activity

I created a new Workflow Activity Library and then added a new Activity called BindForm2Activity. After that I added a new class called BindForm2Validator and then placed an attribute to the BindForm2Activity to link it to the validator class.   Here is the code for each of the classes:   BindForm2Activity.xoml.cs: Code Snippet   using System;using System.ComponentModel;using System.ComponentModel.Design;using System.Collections;using System.Drawing;using System.Linq;using System.Workflow.ComponentModel.Compiler;using System.Workflow.ComponentModel.Serialization;using System.Workflow.ComponentModel;using System.Workflow.ComponentModel.Design;using System.Workflow.Runtime;using System.Workflow.Activities;using System.Workflow.Activities.Rules; using FormsCollection;using Utils; namespace ActivityLibrary{    [ActivityValidator(typeof(BindForm2Validator))] public partial class BindForm2Activity : SequenceActivity {        public static DependencyProperty FormToBindProperty = System.Workflow.ComponentModel.DependencyProperty.Register("FormToBind", typeof(FormsCollection.Form2), typeof(BindForm2Activity));         [Description("Form to bind a datasource to it ")]        [Category("BindForm2ToDataSource")]        [Browsable(true)]        [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]        public FormsCollection.Form2 Form

Freeform Custom Activity Designers using ICompositeView

Hello,   I'm using code posted here http://blogs.msdn.com/b/tilovell/archive/2009/12/31/freeform-custom-activity-designers-using-icompositeview.aspx hosted in a designer taken from Windows Communication Foundation (WCF) and Windows Workflow Foundation (WF) Samples for .NET Framework 4( UsingWorkflowItemPresenter.sln). However, I can't drag & drop Activity1 given as sample into Canvas or any other kind of activity for that matter. Could you tell me what I'm doing wrong, please? Also, I would like to know how I could make the Canvas activity fill the WorkflowDesigner and not being able to be deleted. Thank you

Custom FlowDecision designer

I want to create custom flowdecision designer and activity for it? do any one have any sample? thanks in advance
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend