NET
Gettext i18n strings in ASP.NET controls
In the last post I blogged about using gettext to internationalize strings in C#. However, using the Messages.T("Hello world") syntax in ASP.NET can be a little cumbersome. Luckily, ASP.NET controls can work as a solution for this issue. Adding a simple control which we will name just “t” (and place it in namespace “t” as [...]
Using GNU Gettext for i18n in C# and ASP.NET
We are in the process of dealing with the internationalization and localization of one of our open source web applications, which is fully developed using C# and ASP.NET MVC. Although ASP.NET already provides easy support for i18n via the usage of resx resource files, these are not very user friendly for translators. A resx file [...]
Silverlight Xaml Guidelines
One of the key components of any Silverlight (or WPF) application is XAML, as it serves as the definition for every visual element. Being a markup language intended to replace a bunch of UI-creating-code (remember WinForms?), it can quickly get out of control if not properly organized.
After doing some research on the web and asking [...]
Controls Contract
An interesting feature of Silverlight is how the interaction between visuals and logic (this is, between designers and developers) is handled. It uses a so-called Parts and States Model, which is ensured by a contract specified with attributes in the control class.
Jesse Liberty has made an excellent short post on this subject, which I strongly [...]
Saturation variable function for treemaps
For those of you not familiar with a treemap, it is simply a bunch of boxes somehow arranged inside a bigger box; each of them also contains its own set of smaller boxes, and so on. Each box has an associated weight that determines its size. Take this one as an example from another blog…
[...]
Silverlight Loaded Events
A common scenario in the development of GUI applications is the presence of different events fired by the engine as the visual tree is constructed and rendered. And Silverlight, of course, is no exception.
While WPF provides Initialized and Loaded events for all framework elements, Silverlight has only the latter. There is also a LayoutUpdated method, [...]
Paging in Data-Bound ListBox in Silverlight
A useful feature for most data-bound items presenting controls is the ability to page their data, by showing only the first n elements and requesting the rest on demand as the users scrolls down the view. This is specially useful when downloading each item is costly, and waiting until the whole collection is obtained to [...]
Silverlight Dependency Properties
WPF introduced a new concept for managing properties which is dependency properties. Dependency properties can act as standard properties, but also offer a lot more functionality, such as data binding, assignment through resources, setters in styles, and a lot more. They also allow for easy extensibility since they can be declared in different classes than [...]
Refactoring to WebClient
Since Silverlight 2 Beta 2 introduced the WebClient class, I decided to refactor an application we had by replacing all references to HttpWebRequest with the new client. Its methods seemed much more simple and clear, and I didn’t even need to write a wrapper helper class to make calls to the server. But, as it [...]
Silverlight 2 Beta 2 Breaking Changes
Silverlight 2 Beta 2 has introduced a number of fixes, additions and changes to the previous Beta 1 version. As I said in a previous post, I believe the improved error handling and detailed exceptions are among the best improvements, and also the less commented.
There have also been several improvements in Expression Blend, most of [...]