Archive for the 'Composants' Category


Yet another 3D Lite Engine

Aucun commentaire

I will put online during the summer a first release of the library Tweened. It contains components, behaviors, a Tween wrapper (facilitating the creation of animation by code) and a mini 3D engine very simple to use. Here is a concrete example that can be downloaded here :

Install Microsoft Silverlight

I made this engine primarily for personal needs and to remind me math projective. Reinventing the wheel a some times can be good. The idea is mainly to provide a dll under 40kb, which allows conception of 3D interfaces. This will be useful for designers across Blend or Visual Studio using C #. It will contain in a short time all the basic functions wich are really useful and we do not currently have when using Blend: 3D Camera, 3D Container, 3D scene, detection of normal and smart z sorting (smart and more efficient than currently proposed in Blend) . I added a utility class to facilitate the use of mathematical projective (in progress).

The library contains :

1. A container typed Scene3D (inherited from Panel).
All objects wich are contained within get their projection property locked. Instead of use it, they can use attached dependency properties :

* Scene3D.LocalOffsetX
* Scene3D.LocalOffsetY
* Scene3D.LocalOffsetZ
* Scene3D.GlobalOffsetX
* Scene3D.GlobalOffsetY
* Scene3D.GlobalOffsetZ
* Scene3D.RotationX
* Scene3D.RotationY
* Scene3D.RotationZ

They are associated with an instance of type Element3D. This is recoverable (StartUp event when the 3d scene is broadcast) with an extension method added to instances of UIElement (GetElement3D).
2. A camera linked to the container Scene3D. It offers the following properties:
* FieldOfView
* NearPlane
* FarPlane
* Vanishing Point (XVanishingPoint, YVanishingPoint)
* Displacement (OffsetXCamera, OffsetYCamera, OffsetZCamera)
* Rotation (RotateXCamera, RotateYCamera, RotateZCamera)

Detecting the change of direction of normal (Backface culling) and the scalar product via events  NormalDirectionChanged and DotProductChanged. These events are broadcast by instances of Element3D.

I am currently finishing a sorting algorithm depths. This engine should be fairly optimized because its rendering does not rely on a DispatcherTimer. Well, it is rather rendering pipeline optimized because it is not recursive by default. When only one object is changed, it invokes an internal method RenderElement. Conversely, when the scene or the camera is changed, it becomes recursive and updates all objects in the scene ... See you soon for the final release of the library tweened ...

Silverlight Smooth Streaming plugin for WordPress

Aucun commentaire
Get Microsoft Silverlight

I put online a new plugin produced by Regart.net. It is a smooth streaming video player also capable of playing a standard video format wmv, mov or mp4 (when the video is encoded in H264). You will still need to host the video on IIS server if you want to enjoy the smooth streaming. The setup is relatively simple because we provide an administration window in WordPress. It has a preview of the player, you can change the color, the url of video, AutoPlay, size and background color of the player. It warns you when the video is not hosted on your server, about security constraints you may encounter (crossdomain.xml clientaccesspolicy.xml necessary and configured).

I realized the Silverlight side but I did not use the player SMF published by Microsoft. I preferred to use the library named SLExtensions designed by the company UCAYA. UCAYA is specialized in the design of this type of player. In the past, Ucaya has made the players of "Tour de France", "Rolland Garros", "France Television" and so on. What are the benefits you will ask ? It's simple. First of all, the features provided by the library are ultra complete. In addition, it offers the possibility of a Full MVVM conception, the interface is entirely Designable (much better than skinnable). Finally, its design is quite thin as it can instantiate a MediaElement or equivalent for smooth streaming according to the type of URL you provide : ISML ism and for smooth streaming wmv, mov, mp4 (H264) for standard videos. It is therefore possible to make a player at the card and avoid the arsenal of the library SMF provided by Microsoft.

Gallery in Silverlight for Wordpress

1 commentaire

I recently 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:

Get 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.

Free ColorPicker and ColorChooser custom controls

13 commentaires

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]

A new PieProgressBar Control

Aucun commentaire

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 :)

CustomControl ColorChooser and ColorPicker

Aucun commentaire

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.