BizTalk Custom Pipelines Components – Best Practices – Defining Design-Time Properties: Description and DisplayName

  • Sandro Pereira
  • Dec 7, 2009
  • 4 min read

When you develop a custom pipeline component, the “end user” is usually another developer or a BizTalk administrator. If they open Visual Studio and see a list of cryptic property names with no descriptions, the risk of configuration errors increases.

Unfortunately, in most examples of custom pipeline components, we often forget to properly customize the description and display name of the properties of the pipeline component (myself included 🙂 ).

To create a professional experience, you should use .NET design-time attributes.

📝 One-Minute Brief

Professional BizTalk pipeline components should be self-descriptive. By using .NET attributes like [Description] and [DisplayName], you can customize how properties appear in the Visual Studio Properties window. This guide shows how to implement these attributes in your C# code to provide clear guidance to developers using your custom components, improving usability and reducing configuration errors.

Normally, we usethe BizTalk Server Pipeline Component Wizard to create the custom pipeline component that generates the following code:

private string _ArchiveFilename;
public string ArchiveFilename
{
   get
   {
      return _ArchiveFilename;
   }
   set
   {
      _ArchiveFilename = value;
   }
}

When we add the component to the pipeline, there is no description of the properties at the bottom of the property window. It appears like this:

Pipeline Component Properties

Properties are easy enough to add programmatically that they would integrate perfectly into C# code. But in order to have really good components, they should be easily editable during the graphic design.

This lack of percussion causes some problems when the administrator or some other person tries to configure the component because he doesn’t know exactly what the properties refer to; he only has the name of the property to understand what this is for, in some cases, it is insufficient.

Customizing the Designer

To customize how the property is displayed by the designer, you need four basic attributes: Description, DefaultValue, and Browsable.

  • Description – This is the description that the programmer sees at the very bottom of the Properties Window.
  • DefaultValue – Specifies the default value of the property when the user control is first created.
  • Browsable – If set to false, the property won’t be displayed at all in the designer. This attribute is useful if your property is to be modified only programmatically.

The Format

[properties go here]
public int MyProperty
{
   ...
}

So, to customize better the properties of the component, we have to set the:

Like this:

[Description("The filename of the archive message. This property can include macros")]
[DisplayName("Archive Filename")]
public string ArchiveFilename
{
   …
}

The differences in the result when we add the component to the pipeline are:

  • We have a description of what the property refers to.
  • We can better define the display name of the property, with spaces and special characters.
Pipeline Component Properties

Design-Time Property Browser Attributes

Design-time attributes are essential for displaying your control and its members correctly at design time, as they provide valuable information to a visual design tool.

In the following code fragment, the CategoryAttribute attribute enables the property browser to display the TextAlignment property in the Alignment category. The DescriptionAttribute attribute allows the property browser to provide a brief description of the property when a user clicks on it.

AttributeDescription
BrowsableAttributeDetermines whether the property is visible in the Property Browser.
[Browsable(true)]
DescriptionAttributeDefines a small block of text to be displayed at the bottom of the property browser when the user selects a property or event.
[Description(“The color used for painting alert text.”)]
DefaultValueAttributeSpecifies the default value for a property.
[DefaultValue(typeof(Color), “White”)]
ReadOnlyAttributeSpecifies that this property cannot be edited in the Property Browser.
[ReadOnly(true)]
CategoryAttributeTells the Property Browser which group to include this property in. [Category(“Appearance”)]

Not supported in pipeline components

See more in Common Attributes for Properties and Events or in System.ComponentModel

Remember that these attributes are metadata. They don’t affect the performance of the pipeline at runtime, but they significantly improve the “design-time” experience in the BizTalk Pipeline Designer.

Hope you find this helpful! If you liked the content or found it useful and would like to support me in writing more, consider buying (or helping to buy) a Star Wars Lego set for my son. 

Thanks for Buying me a coffe
Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

2 thoughts on “BizTalk Custom Pipelines Components – Best Practices – Defining Design-Time Properties: Description and DisplayName”

  1. Thank you, after 2 hours of googling I ended up here. This indeed solves programming in Visual Studio, no I need to find out how I can achieve the same in Biztalk, when pipeline component properties are changed on the ports.

    1. Hi Jonas, I am trying to do the same; how to make the component properties visible in biztalk admin console, in other words, in the port level. Did you find out how this can be achieved? My component has design time properties visible in pipeline editor, but when deployed and used in a port in BizTalk, I see “No properties in Component”.

Leave a Reply

Your email address will not be published. Required fields are marked *

The Ultimate Cloud
Management Platform for Azure

Supercharge your Azure Cost Saving

Learn More
Turbo360 Widget

Back to Top