In the [link2post id="174"]previous article[/link2post] I’ve shown how to apply Validation Rules to controls in order to prevent/access user input. In the process, user was warned through a visual change in the target control. It’s the simplistic and direct way of doing validation and works perfectly from the UX point of view. However, from the developer point of view, a better implementation is required to ease the quantity of code needed and to isolate concerns. The idea is to apply validation rules by means of an attached property, in which the owner would have the reference to the control and (more…)
Read moreI’ve recently set up a sample of a validation mechanism for WPF text input controls on the UI that I thought it would be of general interest due to the “Gokuu approach”* I’ve done with it, otherwise it just wouldn’t make my day The requirement is to create a UI control behavior that visually signals validation errors over user input, so when the user submits empty or invalid data on a mandatory field, the input control changes it’s appearance or some kind of action takes place, like a validation message box. Then, it should prevent data submission when a button (more…)
Read moreMVP 2010 Summit is over. Next!
Object, var, dynamic and the DLR Showdown
There’s a time when new feature or frameworks arise and you get to know them and immediately grasp that new and useful way of doing things, but there are also times when clarity only comes after a bit of blurriness. From what I’ve read, the new Dynamic type in c# 4.0 is currently one of such cases, when compared to var. I read many developers say “What’s the point?” or “Why do I need this?”. Well, I believe it’s a matter of architectural needs, mixed with coding style. To break this discussion into pieces, and because I feel the force (more…)
Read moreASP.NET MVC 2 Release Candidate 2 Released
The ASP.NET team shipped ASP.NET MVC 2 Release Candidate 2 for VS 2008/.NET 3.5, and it’s the sequel to the RC version made available in December. It features bug fixes, performance optimizations, and API and behavior additions/changes. Below are a few of the changes between the RC1 and RC2 release (read the release notes for even more details): The new ASP.NET MVC 2 validation feature now performs model-validation instead of input-validation (this means that when you use model binding all model properties are validated instead of just validations on changed values of a model). This behavior change was based on (more…)
Read moreVisual Studio 2008 SP1 WPF Designer Crash
I’m at it again. Yesterday when working on a simplistic WPF form for a user profile configuration scenario, Visual Studio did it again with a bang, crashing in all it’s glory when switching to designer view. What solved the problem? Well… Erasing the solution .suo file so that the IDE doesn’t crash on startup if, by any chance, a xaml document is open in design view, and installing the following hotfix made available by Microsoft: KB963035 – VS2008 SP1 sometimes hangs irretrievably after WPF Designer This hotfix relates to the Visual Studio IDE hanging, not crashing. But nevertheless It can (more…)
Read moreDesign-time width and height in WPF/Silverlight
When designing UI’s in WPF and Silverlight, you may wish to make your layout fluid and auto-expandable in order to take the most out changing UI context. For instance, when data quantity and quality changes, available space may also change and objects in the layout need to adapt to these changes. When an auto layout is needed, no width nor height are specified which can be troublesome since the design view tends to collapse available space. For instance, a variable size user control with a data-binded listbox has no child items in design time, so you’ll see nothing but a (more…)
Read moreMEF and Prism on .NET Framework 4.0
David Hill from the patterns & practices team posted a very interesting article concerning MEF and Prism. It talks about the benefits your applications get from using these extensibility technologies, but also clears some misunderstandings regarding their purpose. I’ve been faced with this question several times and the online community reflects this same common overlap. While MEF is purely an extensibility API, Prism is a development pattern that allows you to organize and manage your WPF/Silverlight project through modularity and thus isolate requirement and functionality concerns in development teams. They’re both part of .NET Framework 4.0 and a MUST if (more…)
Read moreMicrosoft CDN now with SSL support
Following September’s launch of the new Microsoft CDN (Content Delivery Network Service), in which you can reference ajax libraries in cache, Microsoft recently added SSL support, thus confirming Microsoft’s announcement back then. This new feature is necessary in websites that have SSL enabled pages and script library references in them. What would happen until now was a message displaying “This page contains both secure and non-secure items…”. SSL support is now enabled with the scripts hosted on the Microsoft AJAX CDN. Simply use an “https” moniker with any script references on your site that point to the CDN, and they (more…)
Read moreTutorial: jQuery Javascript Library – Part 2
On the previous article, I introduced jQuery and showed how to enable it in your web app, along with a little insight on the basics. Now I’ll start showing some of the most useful methods you will find in the library, along with a sample for each. jQuery API is normally split into the following categories: jQuery Core – Core of the library: jQuery function, object assessors, extensibility and interop methods. Selectors – Filtering and selection operators and attributes to use in jQuery function – #(). Attributes – Generic attribute manipulation methods, including class, text, html and value attributes. Traversing (more…)
Read more





