Tip: WPF 3.0 String.Format

One of the upcoming additions in .NET 3.5 SP1 is a StringFormat parameter you can pass along with your bindings. Sacha Barber has an example of how to use it:
<TextBlock
Text="{Binding Path=AccountBalance, StringFormat=’You have {0:c} in your bank account.’}"
/>
However, if you can’t install the service pack or you […]

Thought: Reactive Programming

"Data binding" isn’t a sexy term. Most object-oriented purists and computer science majors I’ve met like to stare down their nose at it, as if it were all about drag and drop, and limited to the likes of MS Access and VB6. If you want to look smart, don’t talk about data binding
If, […]

Sample: IEditableObject Adapter

Often we find objects that we may not have full control over, but which we wish to use in our UI layer. Some examples are:

LINQ to SQL classes, generated by the DBML designer
WCF/web service message classes, generated by WSDL.exe, svcutil.exe or Add Web Reference
Classes from third party object models - TFS client objects, […]

Sample: SearchQuery (Windows Forms)

Binding Oriented Programming (BOP) is something that I’ve been championing to a number of Readify colleagues. In my original post, I gave an example of how the BOP approach could be applied in a Windows Presentation Foundation application. Then in a post about the SecurityManager, I showed an example that used Windows Forms and followed […]

Sample: Security Manager - ASP.NET Style

Yesterday I posted about a class called SecurityManager, which had the job of checking role-based security settings and exposing properties that could be data bound to. In that example, I created a custom BindingSource in Windows Forms so that I could bind the Visible and Enabled properties of controls to the class, all through the […]