Rehosting WWF designer-custom activity exterior

Source: Internet
Author: User

The main purpose of this article isRehost WWF designerLater, I want users to see a more dedicated designer than the default one provided by Microsoft.ENote (at least the current version is like this ). Due to busy work, the design described in this article is not comprehensive, but only the title and text. I hope you will forgive me. However, for general applications, I think these can meet most of the requirements.

Let's take a look at the basics of custom appearances. When we want to customize the appearance of an activity, we must specify a custom Designer, Because the appearance attribute is basically Protected Attribute. All appearance features are composed Designer Such as the prompt information in the activity center, text in the title, border, background color, and so on. Some of them are in Designer Specified in Activitydesignerthemeattribute Attribute. Set Designer Apply it to our custom activities, and we can see these effects. Example:

[Designer(Typeof(Mysequentialworkflowactivitydesigner),Typeof(Irootdesigner)]

Public Class Mysequentialworkflowactivity:Sequentialworkflowactivity

{

}

WhereMysequentialworkflowactivityFor our custom activities.MysequentialworkflowactivitydesignerFor our custom designer (which should be called the designer may be better ).IrootdesignerThis is a root control. ForWWFThis is the first widget in our designer. If it is not a root control, suchCodeactivityReplace itIdesigner.

Go to our topic,

Now let's changeSequentialworkflowactivitTitle and help text.

SlaveSequentialworkflowrootdesignerInherit a customDesigner.

Reload and implement the following methods.

 

//Change help prompt information

Protected Override StringHelptext

{

Get{Return Res. Wf_helptext ;}

Set{Base. Helptext =Value;}

}

 

//Change title

Protected Override SequentialworkflowheaderfooterHeader

{

Get

{

Base. Header. Text =Res. Wf_text;

Return Base. Header;

}

}

Note: InDesignerThere isTextAttribute. It cannot be used as the title!

Other activities Designer It can be inherited Activitydesigner . Generally, the name of a custom activity is displayed in the center of the activity. If you want to have the English name of the activity, but the display is a Chinese character content, you can implement its Designer In Text here we will not explain more.
for the Article about rehosting WWF designer, see my other articles:
some technical details and application experiences of WWF (I)
some technical details and application experiences of WWF (II)
Custom activity appearance during running of rehosting WWF designer
Custom activity exterior of rehosting WWF designer
drag activity from toolbox to designer
rehosting WWF designer

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.