Category Archives: Wndows Forms

Forms-based desktop applications

Sending Multiple Updates Through the Updater Block

Adding multiple updates to an updater block manifest is actually quite easy. Simply package every update into its own manifest XML file, reference the manifests from the main/index manifest, and update the ID of the main/index manifest so that clients can tell that changes occurred. That’s it! Continue reading

Posted in Libraries, Silverlight, Web, Wndows Forms | Tagged , | Leave a comment

An Overview of the Updater Application Block

The Updater Application Block from Microsoft’s Enterprise Library is not immediately obvious in design. How does it work? We go through the basics. It’s a client-server architecture, which exposes an XML file containing a list of updates — what to download, and what to execute when that’s done. It uses BITS for passive transferring. Continue reading

Posted in Libraries, Silverlight, Web, Wndows Forms | Tagged , | Leave a comment

Fixing ApplicationBlocks.Updater Exception in x64

Microsoft Enterprise Library’s Update block throws an exception in 64-bit machines; this is because of the BG_BASIC_CREDENTIALS struct that uses a field offset of 4 instead of 8. Change it to eight, and your exception will vanish. Continue reading

Posted in Libraries, Silverlight, Web, Wndows Forms | Tagged , , | Leave a comment

Enums, SQL Server, and Null

Ever wonder how to deal with enumerations that might be null? Should you have a “nothing” value? What about SQL Server? As it turns out, enumerations are value types (often represented by integers), which means that they can be nullable! Continue reading

Posted in Core .NET, Silverlight, Web, Wndows Forms, WPF | Tagged , , | Leave a comment

Searching the Entire SQL Server Database

How can you search every row and column in a SQL Server database for a specific string? Well, we link you to a handy dandy SQL stored procedure that does just that! Invoke it, and be amazed! Continue reading

Posted in Tools, Web, Wndows Forms | Tagged , | Leave a comment

Selecting Encrypted Columns in SQL Server

Decrypting columns in SQL Server requires a security key and security certificate. You need to convert the resulting value into the correct type; we explain the process, and summarize what you need and how to do what you need to do. Continue reading

Posted in Tools, Web, Wndows Forms | Tagged , | Leave a comment

Excel-Style Auto-Filtering List Views in DevExpress

How can you apply Excel-style auto-filtering on list views in DevExpress? It’s surprisingly easy: open up your model, expand Views, select the view you want, and set the ShowAutoFilterRow property (under Behaviour) to true. Instantly, you’ll see a filteration row appear under your table header. And you can use a GUI filter designer! Continue reading

Posted in Libraries, Web, Wndows Forms | Tagged , | Leave a comment

Regular Expression Model Validation in DevExpress

How do you add model-level validation in DevExpress? Very simply, with an attribute; there’s a RuleRequired attribute, and a RuleRegularExpression attribute; the former guarantees null/blank values are not allowed, and the latter allows you to specify a regular expression to validate against the field value. Continue reading

Posted in Libraries, Web, Wndows Forms | Tagged , | Leave a comment

Forcing a Database Update with DevExpress

How can you force DevExpress to update the database? Either change the module versions in the ModuleInfo table, or else obliterate the entire database. Then run the DB Updater (in either case) and it will regenerate the schema. Continue reading

Posted in Libraries, Web, Wndows Forms | Tagged | Leave a comment

Limiting the Number of Results from LINQ

How can you limit the number of objects returned from a LINQ query, i.e. only request the first N objects (similar to MySQL’s LIMIT keyword)? The answer is via the Take(n) LINQ method; it pulls the first N rows specified. Continue reading

Posted in Core .NET, Silverlight, Web, Wndows Forms, WPF | Tagged , | Leave a comment