Category Archives: Libraries

Anything related to .NET libraries–whether Microsoft or third-party.

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

If/Else Statements in MVC3 With Razor

How can you write an If/Else statement in ASP.NET MVC3? The answer is, surprisingly, with only one @-sign; although similar code would take five sets of angle-brackets in MVC2, Razor lets us write it with just one — which shows that their design goal of enabling a fluid coding flow was very successful. Continue reading

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

Tools Update: BaseEncoder and Hasher

We’ve updated the Tools library again. You can now convert integers to an from an arbitrary base (binary, hexadecimal, base64, or any base you wish) as well as calculate SHA-1 hashes of strings with one function call. Useful! Continue reading

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

Persistent Storage 1.1: Arbitrary Object Serialization

Persistent Storage 1.1 brings a much-needed feature: the ability to serialize any arbitrary object quickly and efficiently — even without specifying any attributes. Thanks to Mike Talbot of Alterian for his Silverlight serializer. Continue reading

Posted in Libraries, Silverlight | Tagged , | 1 Comment

Silverlight Audio Player

Playing audio files in Silverlight is non-trivial. Hence, the need for a library that allows you to do so; so this is another Tools update to include an AudioManager Silverlight-only class. What does it do? It allows you to play … Continue reading

Posted in Libraries, Silverlight | Tagged , | Leave a comment

Tools Update: Read Embedded Text Files in Silverlight

Tools now includes a EmbeddedResourceFileReader class that allows you to read the contents of text files at runtime; this is exciting for Silverlight development, where you may have lots of data you want to dump into a file and read at runtime. Well, now you can! Continue reading

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

Normal Distribution Random Generator Available!

We’re pleased to announce a new reusable library: a normally-distributed random number generator. It works like a standard integer random number generator, but produces a normal (bell-curve) distribution instead of a uniform (flat) one. We also packaged a Mersenne Prime implementation with it. Continue reading

Posted in Libraries, Silverlight, Web, Wndows Forms | Tagged , | 1 Comment

SQLite + ADO.NET + C# 4.0

C# 4.0 and SQLite ADO.NET don’t play together so well. You might get some crazy exception about the mixed mode assembly version can’t be loaded without configuration. Then, you’re flying! Continue reading

Posted in Libraries, Tools, Wndows Forms | Tagged , , , , , | 16 Comments