Archive for the Lightweight toolkit Category

Actually this is not the real first widget. The panel has been created before but it is not really “visual”. Hence I preferred to talk about it later and to start with the label.

I started with it because it is one of the easiest widget to develop.

A picture is worth a thousand words so here are some screenshots:

In design mode:

label-widget-design-mode

When running:

label-widget-runtime

Like the common windows forms label, the widget label has a text and an image property plus a full set of properties to customize its appearance.

Mots clés Technorati : ,,

Before starting to code, the general toolkit architecture has to be defined.

Here is a summary of these design choices:

First of all, in order to avoid confusion between the control object (visual component) and the control class, I will call "widget" a "lightweight control".

In order to have lightweight widgets, the base class for all widget will be component. Component is a good candidate because even if it doesn’t provide a lot of things, it can be "sited" (understand: use ISite) and can appear on the Design Surface (with a lot of work).

The abstract class "WidgetBase" will be created. It will add to the component class all necessary features for being a good widget base class like:

  • Keyboard management
  • Mouse management
  • Data binding
  • Painting
  • Animation support

ContainerBase will inherit from WidgetBase and will manage a collection of widgetbase children.

By default, the winforms architecture does not allow to have components represented visually on the design surface (on the form). In order to bypass this limitation, widgets will be hosted by an "HostSurface", inheriting from ScrollableControl. We will call it HostSurfaceBase.

In order to provide an intuitive and easy to use design time, each widget will have an associated designer. It will allow:

  • Widget resizing;
  • Drag and Drop
  • Widget selection
  • Properties editing

A lot of design time features available for controls won’t be reusable. It will mean to redevelop quite a lot of things that already exist.

Mots clés Technorati : ,,,

Like all project, it starts by defining the scope. I have a lot of ideas but it is necessary to stay realistic. Hence here is the list of planned features:

  • I want a LIGHTWEIGHT component library, something usable even if there are a lot of widgets in the form.
  • Provide support for deep customization. It will be achieve by creating a pluggable rendering system.
  • Several renderers will be provided: a “system one”, a one using the visual style in use and a one inspired from Office2007 UI.
  • Developers will be able to create their own renderers by inheriting from existing ones.
  • Provide a simple animation system.
  • Support simple and more complex databinding.
  • Provide a modern UI system (Super tooltips, …)
  • Provide an easy to use library with deep Visual Studio integration.

Realistic? I hope so!

Mots clés Technorati : ,,,

After several months passed to study the feasibility, it is now time to start real things.

The goal of the project is to create a new widget library for .Net 2 Windows Forms platform.

First of all I have to clarify some point about this project:

Q: Why another UI component library?

A: I took the decision to create a new library after tried existing ones on the market. Most of available libraries are good; however I always had the same issue: when adding a lot of controls on a form, performances are very bad. Everything was slow and the response time was not acceptable for a decent user experience.

In addition it was often really difficult to customize some minor graphical aspects of existing controls: who never tried to change minor things like textbox bordercolor and encountered difficulties to achieve it?

Q: So why not using WPF?

A: For me WPF is a very promising technology. However it is still very young and the needed effort to learn it is important. A lot of developers are still using Windows Forms and I think that this technology is not yet died and has still a beautiful future.

For these reason I decided to create my own library. I know that the creating a set of components is a big task but motivation is the key of everything!

I will use this blog to communicate about the progresses made.

More information soon!