Archives de
Étiquette : WPF

Animated Metro style control in WPF

Animated Metro style control in WPF

Here is a little set of control that allow you to create (quickly) a Metro like menu. Example : [jwplayer config= »GrundgeAdapt » file= »http://www.alphablog.org/TiercePartie/Video/GridControl.mp4″] Bring me now to download ! Way it works : The project is done by two distinct items. First one is a behavior that you put on a grid, the SliderGridBehavior. It will transform the given grid to a « moving » grid. When you click on one of it’s cell, you will expand it (with an animation). You can…

Lire la suite Lire la suite

Event-driven architecture

Event-driven architecture

This post will not debate on the benifits of this kind of architecture. We will discuss performances … What is an event ? A source will raise an event to indicate, to anyone who’d care to listen, that something happens. A destination will receive this event and act accordingly. Why choosing an event driven architecture ? Responsibility It’s interesting to have multiple components which have separated responsibility. It is clearly separated, more maintainable and reduce coupling. Simplification Each part of the architecture are separated….

Lire la suite Lire la suite

Blend Behaviors : Expand textbox and add dot dot dot ellipsis

Blend Behaviors : Expand textbox and add dot dot dot ellipsis

Behaviors is one of the nicest feature in WPF and Silverlight. This article will show how to create and use 2 behaviors : Expand a textbox depending on it’s content Add ‘…’ if the textbox content exceed it’s container size. Here is a sample video : [jwplayer config= »GrundgeAdaptSmall » file= »http://www.alphablog.org/TiercePartie/Video/BehaviorSample.mp4″] There is two behaviors and one helper class in my solution : And the graphic stack :   AddDotDotDotToTextboxBehavior This class is binded on the ‘…’ textblock and contains a reference…

Lire la suite Lire la suite

Simple Plugin System based on Ninject and MVVM Light

Simple Plugin System based on Ninject and MVVM Light

My goal was to develop a simple but useful plugin system for my future developments. I wanted to keep/to have: Blendability Ninject power and flexibility Smooth animations Modularity (development & code) Fast “menu” system This sample rely on a solution available here : PluginSystem.zip Solution The PluginSystem assembly contains the plugin base class, the view model base class and an animated content control. PluginBase class : This class force plugins to expose a user interface, an name (for menu printing in this…

Lire la suite Lire la suite

Silverlight 5 and Tasks : strange behavior ! (Updated)

Silverlight 5 and Tasks : strange behavior ! (Updated)

This blog post aims to talk about a strange behavior of Silverlight when using TPL (Tasks parallel library) . Context   You may need to integrate OData service in Silverlight. In this context, you could add your business code in the Silverlight part. It can result a sequence of asynchronous call in Silverlight (like Russian doll) : When server raises an exception it must be propagated to the client (with or without message). In my future example, I will try to create…

Lire la suite Lire la suite

Why blend is for developers ?

Why blend is for developers ?

During the TechDays 2012 conference, I have seen a course about “Blend for designers” from Michel Rousseau. It is now time to go on through this way: Blend is also for ergonomic specialist. Blend is also for developers. How many times I have seen people saying : “I am a developer so I develop the application and give it to the designer” : Without an ergonomic study before, you might create an application inside out, upside down and back-to-front… “I am…

Lire la suite Lire la suite

Tips and tricks : Silverlight autocompletebox with huge amount of data

Tips and tricks : Silverlight autocompletebox with huge amount of data

This new post will explain the ability to use the autocomplete box with more than 10 000 items in the list. It will result an unpleasant latency… It will freeze your user interface during seconds ! The silverlight solution You just need to add the System.Windows.Control reference. The main page Xaml is like described below : Generate items Here is the little code that generate 12 000 lines and put it to the itemsource : You can run the sample…

Lire la suite Lire la suite

Siverlight Architecture Feedback (Part 1/2)

Siverlight Architecture Feedback (Part 1/2)

Thanks to Devoteam Luxembourg, i am actually setting up a Silverlight architecture but it was not my first practice… I have already setup Silverlight architectures over a service layer. In most cases, i found some great shortcuts, some tips about what can be done and what can »t be done. My brainstorm result will be explained in this paper. Uses cases Since few years, I am practicing Silverlight in a business context. In each cases clients ask us to develop a user…

Lire la suite Lire la suite

Coding dojo Silverlight

Coding dojo Silverlight

We will create an application for reading CSV from your bank account and, with simple pattern recognition, displaying a chart on the result. In this coding dojo we will see How to setup MVVM with Galasoft MVVM Light. How to use Blend as user interface designer. How MVVM can be applied in a concrete case. How developping quickly and with a relatively clean manner with MVVM. How to use chart of Silverlight toolkit. This humble dojo does not expect to be perfect but it can show…

Lire la suite Lire la suite