One framework to rule us all…

WPF Input Validation Part 3: Markup Extensions

In the [link2post id="175"]previous article[/link2post] we took a step further on input validation over WPF controls by means of an attached property. The attached property’s owner would then have the required programming to add validation logic to the control’s target dependency property binding. Keeping optimization in mind we can go, once again, a step further on this and reduce the code required by implementing our own Binding object, with it’s own validation mechanism, that could be configured by the developer in design time. An example of this methodology would be going from this:

To this:

So what’s the trick […]

Read more

WPF Input Validation Part 2: Attached property approach

 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 […]

Read more

WPF Input Validation Part 1: Tutorial and examples

I’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 […]

Read more

MVP 2010 Summit is over. Next!

And that’s a rap. The 2010’s Most valuable Professional Summit is now over. It took place in Bellevue & Redmond, Washington, and for those who couldn’t be there for all the good stuff in the agenda, well, eyes wide open for blogs, tweets and streams. In the meantime, get yourself on the run for that distinguished MVP title and get your ticket to next year’s summit as well as your trophy-kit. The girls will love it… I guess :o) Next, on April 12th, Microsoft will be pairing with DevConnections for the Visual Studio Launch at the Bellagio Hotel and Casino […]

Read more

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 […]

Read more

ASP.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 […]

Read more

Visual 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 […]

Read more

Design-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 […]

Read more

MEF 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 […]

Read more

Microsoft 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 […]

Read more