Archive for the 'composants' Category

Wed, Jan 20th, 2010
posted by Eric Ambrosi 10:01 AM

In a joint production of Regart.net and Microsoft, I participated with Boris Forconi, in developing a plugin for wordpress. The idea was to create a Silverlight gallery in wordpress using the API but by developing the gallery itself in Silverlight. It is partially based on the one made by Tim Heuer. Boris has occupied any part of PHP and Wordpress integration. For my part, I developed the Silverlight gallery. The goal is to provide a simple way to put pictures online nicely for Wordpress blogs as shown below:

Install Microsoft Silverlight

Just write a tag like : [sl-gallery: ...]

You can set parameters as shown in the example below :

  • width=400
  • height=400
  • leftArrow=true
    //show/hide left arrow
  • rightArrow=true
    //show/hide right arrow
  • pageNumbers=true
    //affiche ou cache la pagination
  • thumbnails=true
    //show/hide thumbnails
  • fill=uniform
    / / used to indicate a way of filling you can choose between:
    / / Uniform (homothetic part by filling ability)
    / / UniformToFill (filling with homothety)
    / / Fill (filling with deformation dimensions)
    / / None (preserves the original dimensions)
  • bgcolor
    //set the background color
  • bgmode
    // set the background mode(windowless)

The first good news is that it is possible to use a menu to set it all in 2 seconds. It adds to the administration of sections Wordpress. A small window appears when you click the button (see below).

The second good news is that we will quickly sources available on wordpress.com. This way you can completely change the visual side of the gallery Silverlight. In all cases, it dynamically retrieves images from the gallery Wordpress. You can download a first version here.

Tue, Jan 5th, 2010
posted by Eric Ambrosi 03:01 PM

I put online two new components outlined below :

Install Microsoft Silverlight

You can download the tweenedcontrols library here.

ColorChooser

Since its beta version, this control has been greatly improved. It is now possible to click directly on the surface of the two swatches to select a color. The property is SelectedColor this time of type Color. This greatly simplifies the code and avoids the usage of an IValueConverter class.

ColorPicker

That component is intended to make a ColorChooser appear when user click on it, with the help of an instance of Popup. The whole problem was to place the ColorChooser beside the ColorPicker in any case. To this end, I've created a method of  extension for Class Popup. It is also possible to access to the style and template of ColorChooser directly through the menu Template Edit => Edit Template Aditional as shown below.

ColorPicker has the IsOpen dependency property coupled with Opened and Closed events. Apart from this trick this class exposes properties and events of a ColorChooser.

[silverlight: http://www.tweened.org/wp-content/uploads/applis/TestColorControls.xap, 540, 323,3.0.40818.0]

Wed, Dec 16th, 2009
posted by Eric Ambrosi 08:12 AM

For the purposes of a recent production, I had to design a control named PieProgressBar. This class inherits RangeBase and as such has all the capabilities inherent in this type of control. It behaves in the end like any type ProgressBar control with a few more things. The hard part was to create dynamically pie in C #. Unlike WPF, Silverlight does not allow to override method to create new kinds of Shape. In other words, even if Shape is an abstract class, it is useless to inherit because the method of route design can not be overloaded.
The other technique is to use the "Path mini language" for creating geometric shapes in XAML. I had to use 3 segments with a ArcSegment to achieve this control. as I could not create primitive Pie for the designer in Blend, it took cunning ... The technique involves creating a pie chart dynamically when assigning a control part (ControlPart). Internally, the properties of filling the route generated, are related to properties of the control via a simple data binding created in C #.
You can see some examples below and download the library
tweenedcontrols here.

Install Microsoft Silverlight

Once the dll referenced, you can instantiate the control PieProgressBar in Blend through the Assets panel as shown below:

This component will probably be included as others in the CodePlex project SLExtensions. Thierry Bouquain updates it at this time and I welcome the move :)

Fri, Oct 30th, 2009
posted by Eric Ambrosi 12:10 PM

Hi, I recently have to find a solution create two customs controls

I recently needed controls customizable type ColorPicker ColorChooser and, finding none, I have designed from scratch, here's a demo.

Install Microsoft Silverlight

They are in beta but I think provide a final version by November 15. In the meantime, if you want to test those controls and download the dll to test in SL3 is here.

Ps: the Silverlight plugin for wordpress provided by  Tim Heuer, is powerful and useful, so thank you to him, I will only use this solution from now.

 

You are currently browsing the archives for the composants category.

Auteur du livre “Pratique de Silverlight” aux éditions Pearson

Categories

Archives