I am sure you’ve seen software selling with free for life support and updates. And every time I see that I cringe. Because I know that either seller is at best naive or at worst deceptive.

I know it looks good to market that way and it makes customers feel kind of good and safe. Well, at least until they stop to think about it. Free for life support and updates is just not sustainable. You can bet that if product becomes successful these terms will end or company will simply go out of business.

Why this is not sustainable? Because you have to pay people to support and develop products and unless there is revenue to do that there will be no support and no updates. As you add more and more customers you will get more and more support requests as well as feature requests. Since your customer base cumulatively grows over time so will support and feature requests and they will outgrow the resources you have to handle them so situation will become unsustainable.

I can see it being somewhat sustainable if all you do is not add any features to the product and try to minimize the support in every possible way through FAQ’s and community forums and do not have dedicated support personnel. But that to me is sign of dead product, and dead products don’t sell. Customers expect the activity and signs of life from the product and if there is none, there will be no sales.

Why not honestly address that up front?  For example, we include 12 months of support and updates with all our products. I think that is honest and fair. If you find products, support and additions we make useful you can elect to renew support and updates subscription for additional 12 months but there is no pressure on you to do so…

I also think that this model is much better than minor/major upgrade policy where there is no charge for minor releases but there is a charge for major upgrades.

One thing I know is that everything that you buy can be broken into its monthly cost because nothing lasts forever. Either the product/service bought will stop working and reach end of its useful life, or we will reach end of our life. Either way there is a fixed amount of time product or service can be used and thus there is a monthly cost associated with it. You can break it per month or lump it up in single sum for 12 months or some fixed period. But nothing lasts forever.


Throughout my carrier I’ve been amazed that companies that employ professionals nickel and dime them to death on hours worked.

I remember one company I used to work for. They expected that you work your 8 hours, be in your chair plugging away on keyboard all the time. You had to take 1 hour lunch break, whether you like it or not, and you had two 15 minutes breaks in those 8 hours. And yes, it was developer job and it was not consulting either.

I’ve seen this again and again and never really understood how this can be good for the company.

The problem with companies like this is complete lack of trust in people they employ. They think everyone is out to rip them off so they treat their employees like thieves. I understand that they’ve been burned in past by employees not being productive so they think everyone is like that.

Yes, I’ve seen people not doing any work for months at a time without any repercussions and while being fully paid. They show up for 8 hours a day, but don’t produce anything, so what good is it to mandate strict hours?

I believe that most people have professional pride in the work they do. Accounting for every single working minute does not at all address what you really pay them to do, which is productive meaningful work.

Quickly fire people that don’t produce and give freedom and flexibility to people that do. But for that, you have to have management that is able and capable to make quick and decisive decisions which is problem in lot of companies. Instead, they come up with stop-watch nickel and dime working policies…

Never that will be the case here at DevComponents…


Here it is. DotNetBar for Windows Forms 8.1 is now available. Included are over 40 new features and enhancements. I already covered two huge new controls:

If you do not own DotNetBar give it a try. We now have total of 50 controls to help you create professional WinForms applications. If you own DotNetBar license then go here to download latest build.

Tagged with:

How To Debug WPF Binding

One of the probably most common things you do in WPF is specify Bindings. But how do you debug them?

In WPF 3.5 there is new diagnostics that you can turn on that will output detailed binding messages to the Output window. Immensely helpful when you are trying to debug why your binding does not work.

To set it up first add diagnostics to your namespace:

<Window x:Class=”Tester.Window2″


Then enable it on per-binding instance as such:

ItemsSource=”{Binding Path=PaneItems, diag:PresentationTraceSources.TraceLevel=High}”

Now when you run your app watch Output window for clues on why binding is failing.

Hope this helps save your sanity while debugging bindings as much as it does mine 🙂

Tagged with:

In this post I will show you the new Highlighter component that will be included in DotNetBar for Windows Forms 8.1 that we are planning on releasing soon.

Highlighter component allows you to visually highlight any control on the form using distinctive border style. You can use it with our SuperValidator component to highlight validation errors on the form. You can use it to highlight currently focused text-box. Or simply to draw user attention to control on the form.

To start using Highlighter control just double-click the highlighter component in VS.NET Toolbox to add it to the form:

Figure 1 – Highlighter Components in VS.NET toolbox

This is how form looks like with Highlighter component added:

Figure 2 – Highlighter Component on the form

To each control on the form the Highlighter component will add two properties:

  • HighlightColor – Specifies the color to highlight the control with.
  • HighlightOnFocus – Specifies whether control is automatically highlighted when it receives input focus. Highlighter.FocusHighlightColor property specifies the color that will be used for focus based highlighting.

To highlight any control on the form select the control and set HighlightColor property:

Figure 3 – Setting HighlightColor property

This is how control would appear at run-time with HighlightColor property set:

Figure 4 – Highlighter component highlighting the control

Setting HighlightColor from code

To set HighlightColor using code, use following statement:

highlighter1.SetHighlightColor(textBoxX1, eHighlightColor.Green)

To remove highlight from the control use following statement:

highlighter1.SetHighlightColor(textBoxX1, eHighlightColor.None)

Highlighting Focused Control

Highlighter component provides you with functionality to highlight control with the input focus automatically. All you have to do is set HighlightOnFocus property on each control on the form that you want to highlight. The easiest way to do that is to select all controls on the form you want to highlight as they receive focus:

Figure 5 – Select all controls you want to highlight on focus

Then in VS.NET property window set HighlightOnFocus property to true:

Now when you run your project and tab through controls on the form you will see the focused control highlighted:

To create focus highlighting from code use following statement:

highlighter1.SetHighlightOnFocus(textBoxX1, True)

and to remove focus highlight use following statement:

highlighter1.SetHighlightOnFocus(Me.textBoxX1, False)

I hope that this provides you with the good overview of the new Highlighter component that is unique to DotNetBar. I am sure in couple of months you will see clones everywhere, like it usually happens with new stuff we create 🙂

Tagged with:

This post covers new components that will be included in next version of DotNetBar for Windows Forms 8.1 that we are wrapping up right now. Today I will cover the all new SuperValidator component.

DotNetBar SuperValidator is the component set that helps you implement validation of user input in your WinForms applications without writing any code for most common validation scenarios. Here is screen-shot that shows simple validation performed on the form using SuperValidator and Highlighter controls included with DotNetBar:

1 – Super Validator control in action

To start using validations components, first drop the SuperValidator component from VS.NET toolbox onto your form:

2 – SuperValidator Component in VS.NET Toolbox

3 – SuperValidator added to VS.NET Form

Notice that when SuperValidator component is added to the form it automatically creates two supporting components:

  • ErrorProvider component to display the error state and tooltip message next to each input field
  • Highlighter component to visually highlight input field with error using distinctive border

SuperValidator can work with any of these components set or without any of them at all if you are planning to report validation results some other way.

Choosing when to perform validation

Next step is to choose the way SuperValidator performs validation. That is done by setting ValidationType property as shown in image below:

4 – ValidationType property setting

ValidationType values explained:

  • Manual – You perform validation by calling SuperValidator.Validate method.
  • ValidatingEventPerControl – For each control that is being validated the SuperValidator will handle its Validating event and perform validation. If validation fails it will use ErrorProvider and Highlighter that are set to indicate the error as well as cancel the focus move if CancelValidatingOnControl property is set to true (default value)
  • ValidatingEventOnContainer – Validating event will be handled on ContainerControl, by default the parent form, to perform validation. If validation fails all failures will be reported using ErrorProvider and Highlighter, if set. The Cancel event argument in Validating event for container will be set to false as well if validation fails.

Assigning Validation To Controls

SuperValidator control adds Validator1, Validator2 and Validator3 properties to each control on the form as shown in image below:

5 – SuperValidator Properties

These properties allow you to define 3 level validation for each control. Validation starts with Validator1, Validator2 and finally Validator3. You can assign one of these properties or all of them if you need to perform multi-level validation. For example you can require the input for text-box and enforce the format to be an email by assigning Validation1 and Validation2 properties.

Select control you want to assign validation to and change its Validator1 property to choose desired validation type.

6 – Select control to set validation for

7 – Choosing validation for input text-box

In this example we will choose “Required Field Validator” which will ensure that text-box has value.

Next, expand the Validator1 property to set validation properties:

8 – Changing Validation Properties

Here is explanation for each property on validator in the order they are displayed in screen-shot above:

  • DisplayError – Indicates whether failed validation is reported or not. The failed validation will still be available programmatically through LastFailedValidationResults collection.
  • Enabled – Indicates whether validation is enabled.
  • ErrorMessage – Is the message that is displayed through error provider to indicate to end-user what the problem is.
  • HighlightColor – Specifies the highlight color that Highlighter component, if set, will use to highlight the control when validation fails.
  • IsEmptyStringValid – For controls that support Null/Nothing values this property indicates whether an empty string is considered valid value.
  • OptionalValidationGroup – Indicates the name of the group that validation belongs to. Groups are used to validate multiple controls as a single entity and allows you to for example require input in any of the controls in a group but not all of them.
  • ValuePropertyName – Indicates the property name that holds control value. SuperValidator usually guesses correctly the property name (for example Text on TextBox) but in case you are using custom control with unusual property name that holds value of the control you can set it here.

Regular Expression Validation

In previous example you’ve seen required field validator. SuperValidator also provides validation based on the Regular Expressions. You can read more about regular expressions in MSDN starting at following URL: http://msdn.microsoft.com/en-us/library/hs600312%28VS.80%29.aspx

When Regular Expression Validator is assigned to input field it looks like this in property grid:

9 – Regular Expression Validator

Here is description for the properties that are specific to this validator:

  • EmptyValueIsValid – Indicates whether validator will allow empty input values.
  • ValidationExpression – Specifies the regular expression to use for control’s value validation. You can type your own regular expression or use drop-down button to choose one of the pre-defined expressions included with control.

Comparison Validation

SuperValidator component includes Comparison Validation that allows you to compare values of two input fields or to compare input field value to a predefined value you set. You can use this for example to ensure that password entered matches the confirmation password on input form or to ensure that numeric input value is greater than number you specify. Here is an example of input form that uses comparison validation to ensure that two password fields are the same:

10 – Comparison validation example form

These are properties set on confirmation password text-box that have comparison validator assigned:

11 – Comparison Validator properties

Here is description for properties that are specific to comparison validator:

  • ControlToCompare – Specifies the control to compare the input value to. In the example above we will compare the confirmation password text box to the password text box.
  • ControlToCompareValuePropertyName – Is the name of property that holds control value. Usually it is not necessary to set unless you want to use specific property as value property.
  • Operator – Specifies the operator that is used for comparison. Following image shows available operators:
  • ValueToCompare – Specifies the value to compare input value to using specified Operator. You would set this property if you want to use comparison operator to ensure certain value is entered in input control. Note that this value is used for comparison only if ControlToCompare property is not set.

Range Validation

Range validator allows you to ensure that input value is in certain range. Here are properties available on range validator:

Here is description for properties that are specific to range validator:

  • MaximumValue – Indicates maximum value.
  • MinimumValue – Indicates minimum value.

Custom Validation

When none of available validation options fit the bill you can use custom validator and write your own validation code. When you assign the custom validation to a control here is what you see:

12 – Custom validator

Next step is to attach event handler for ValidateValue event on custom validator. First, select CustomValidator instance in VS.NET property grid using the combo-box on top of the property grid:

With CustomValidator component selected, switch to the event view:

And double-click the ValidateValue event to create event handler:

Here is example code for ValidateValue event handler:


private void customValidator1_ValidateValue(object sender, DevComponents.DotNetBar.Validator.ValidateValueEventArgs e) {

if (e.ControlToValidate.Text == “DotNetBar”)
e.IsValid =

e.IsValid =



Private Sub customValidator1_ValidateValue(ByVal sender As System.Object, ByVal e As DevComponents.DotNetBar.Validator.ValidateValueEventArgs) Handles customValidator1.ValidateValue
    If e.ControlToValidate.Text = "DotNetBar"  Then				
       e.IsValid = True
        e.IsValid = False
    End	If
End  Sub

This example validation simply checks whether value entered is “DotNetBar” and validates control input if it is.

Working with SuperValidator from Code

When working with SuperValidator using VS.NET designer all settings that you make are actually translated into the code that you can find in InitializeComponent() method of your form. The easiest way to find out how to do something from code is to setup the control the way you want it using designer and then explore InitializeComponent() method.

Here is simple setup for SuperValidator control:


SuperValidator superValidator1 = new SuperValidator();
superValidator1.ContainerControl = myParentForm;
superValidator1.ErrorProvider = myErrorProvider1;
superValidator1.Highlighter = myHighlighter1;
superValidator1.ValidationType = DevComponents.DotNetBar.Validator.eValidationType.ValidatingEventOnContainer;


Dim superValidator1 As DevComponents.DotNetBar.Validator.SuperValidator
superValidator1 = New DevComponents.DotNetBar.Validator.SuperValidator
superValidator1.ContainerControl = myParentForm
superValidator1.ErrorProvider = myErrorProvider1
superValidator1.Highlighter = myHighlighter1
superValidator1.ValidationType = DevComponents.DotNetBar.Validator.eValidationType.ValidatingEventOnContainer

Assigning validation to a control on the form is done using following code:


RequiredFieldValidator requiredFieldValidator1 = new RequiredFieldValidator();
requiredFieldValidator1.ErrorMessage = "Please enter First Name.";
requiredFieldValidator1.HighlightColor = DevComponents.DotNetBar.Validator.eHighlightColor.Red;


Dim requiredFieldValidator1 As RequiredFieldValidator
requiredFieldValidator1 = New RequiredFieldValidator()
requiredFieldValidator1.ErrorMessage = "Please enter First Name."
requiredFieldValidator1.HighlightColor = DevComponents.DotNetBar.Validator.eHighlightColor.Red

To remove validator from control you would use following code:


superValidator1.SetValidator1(textBoxX1, null);


superValidator1.SetValidator1(textBoxX1, Nothing)

Handling Cancel button on the form

If you have dialog form with validation attached to the controls and validation type is set to per-control or container, to be able to close the form as response to Cancel button being clicked you would simply disable validator by setting Enabled property to false:

superValidator1.Enabled = false

Then you can close your form as usual using Close method.

Custom Error Providers

If you wish to use custom error provider to display validation errors in your application you can do so by implementing IErrorProvider interface. You assign your custom error provider to CustomErrorProvider property.

I hope this gives you a good overview of the new SuperValidator component. Stay tuned for more…

Tagged with:

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...

© 2009 Denis Basaric: DevComponents Blog