Silverlight Async Programming – Best Practices

Silverlight client runtime does not allow synchronous operations and requires network-based operations to be asynchronous. While asynchronous and event-based programming models have been a part of the .NET Framework since the earliest versions, orchestrating sequential and parallel asynchronous workflows can be problematic.

Form Validation using jQuery Validation plugin

image

In the example above, we only used three validation methods (required, email and url). There are several other methods that can be used here. Here are a few of them:

  • remote: requests a resource to check the element for validity.
  • min: makes the element require a given minimum.
  • date: makes the element require a date.
  • creditcard: makes the element require a credit card number.
  • equalTo: requires the element to be the same as another one.

You can find an exhaustive list of built-in validation methods at http://docs.jquery.com/Plugins/Validation#List_of_built-in_Validation_methods.

But I can’t find a suitable built-in method for my situation. Can I write my own method?” Yes you can! And its really easy.

Writing Your Own Validation Method

Calling the jQuery.validator.addMethod() method. It takes three parameters:

  • name: The name of the method, used to identify and referencing it, must be a valid javascript identifier.
  • method: the actual method implementation, returning true if an element is valid.
  • message: The default message to display for this method.

In the validate function, we specify that the ‘sport’ field should be validated using the selectNone method.

image

Make sure to look at the source code behind these demos

Via Form Validation using jQuery

Another tutorial here

Windows 7 Taskbar .NET Sample Library – an Overview

image

This is the first post in a series of Taskbar posts. It provides an overview of both the new Taskbar functionality and the Taskbar and Libraries Sample .NET Interop Library, which is a managed code wrapper and part of the Windows 7 .NET Interop Sample Libraries.

Windows 7 Taskbar .NET Sample Library – an Overview – Windows 7 for Developers – The Windows Blog

Notification Bar

 image

Introduction

The NotificationBar gives you an easy to use control that can replace message boxes / pop up boxes where they are not really needed. When the need arises to display a small amount of information without distracting users with pop ups, this would be a solution worth checking out.

Anyone who has used IE6+ on Win XP SP2+ knows about those Information / Notification bars you get when trying to download a file etc. That is what I have brought here today. A small, completely C# version of that control.

Current Features

  • Fast
  • Works on .NET and Mono
  • Can be used in commercial projects
  • Can flash control any number of times
  • Can use animation when showing and hiding the control
  • Can play sound when shown
  • Automatic word-wrap

CodeProject: Notification Bar. Free source code and programming help