VSLab Viewlets and lightweight controls

by cisterni 10. September 2008 21:13

Back to normal work, still fixes to do for the CTP update rush, but I'm finally able to restart the work I stopped to update the code base. A major update that is available in the current release of VSLab though not entirely defined is the support for lightweight controls. The inner working of VSLab requires (have a look to the white paper discussing the implementation) the use of Windows Form instead than WPF for developing viewlets. I hope to circumvent this limitation some day, but this is the current situation. Moreover you cannot aggregate user controls when developing viewlets, again for core reasons (essentially VSLab runs in the F# interactive process and draws in toolwindows owned by the VS process). This is the reason for implementing lightweight controls for Windows Forms: this kind of controls are available on other systems such as Java AWT and offer a mean to have logical controls without having to pay for GUI window peers.

The ViewletControls project contains the panel responsible for implementing the lightweight controls abstractions, still under definiton and debugging. The Viewlet class already inherits from this container nonetheless. We are defining basic controls to ease the implementation of viewlets, though we believe that drawing should remain the core of viewlet development since the composition is obtained through the toolwindows in Visual Studio and dialogs can be opened directly from F# without having to fill the viewlet area with controls.

Another feature recently introduced for viewlets is the Windows caret support. It is now possible to display the Windows caret at (x, y) to have input directly in the viewlet toolwindow without having to resort to textboxes.

I love this part, reimplement controls is always a good opportunity to remember the good old days.

The lightweight controls also will include a timer to express animations easily using yield expressions (continuations) using a single timer. The library has been designed after another library designed for Web applications and recalls features available in the WPF framework. Future posts will discuss with examples the usage and the implementation of this library.


Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Design | General

Powered by BlogEngine.NET
Theme by Mads Kristensen

VSLab blog

VSLab is a Visual Studio extension designed to support Visual Studio interaction from F# interactive. It is a Microsoft product developed at University of Pisa, by a team lead by Antonio Cisternino.


Recent comments

Comment RSS


The opinions expressed herein are my own personal opinions and do not represent my employer's view in  anyway.

© Copyright 2008