miércoles, 24 de noviembre de 2010

Scroll Decoupled Behavior for Silverlight

This post introduces the creation of a behavior in order to have a decoupled scroll with separated buttons for moving to the left or right the ScrollViewer and also a separated Thumb element. At the end of this post, I have pasted all the code.

martes, 16 de noviembre de 2010

HoldPressingClick Behavior

I had to design a new behavior in order to capture the pressing click action along a time. Furthermore, when this action performs, I needed to change a property of other element. Finally, I wanted to do all this in a resource dictionary (without code behind, according with MVVM).

lunes, 8 de noviembre de 2010

Dynamic Objects

In the last few days, many people asked me about how to access to properties or methods marked as private or internal in order to do unit tests or consume libraries that they are not good defined (take care about this because if a method or property has been marked as internal maybe it is because the implementation of this method can change). Anyway, I will introduce a new interesing new feature en C#, the Dynamic Objects.

domingo, 31 de octubre de 2010

Using PRISM, WCF Ria Services and MVVM together

In this post, I will introduce the usage of prism within WCF Ria Services and the pattern of design Model-View-ViewModel in a few steps.

viernes, 29 de octubre de 2010

Splash Screen in Silverlight

In my last personal project, I had to modify the splash screen silverlight in order to show a custom loading page instead of the silverlight one:

There are a lot of information in the web in order to do this, but not many of them gathered the information to explain some features that I needed: full screen, animations, logic inside this screen. I am going to try to gather all this information in this post.

lunes, 25 de octubre de 2010

Watchdog Abstract

I have designed a WatchDog abstract class with a common behaviour in order to adapt it to manage any program, instance, thread, web service, window service or whatever.

viernes, 15 de octubre de 2010

Apply permissions to actions in ASP MVC

I have created a decorator named “AuthorizeAttribute” for actions in order to check roles and permissions of the user. The behavior is exactly the same that the “AuthorizeAttribute” decorator from ASP MVC assemblies, this is used to check whether an user is granted to use a specific functionality if he/she has enough permissions and the right role.

Bind events within Resource Dictionary to ViewModel using Commanding

Firstly, you need to add a reference to the MVVM Light DLLs. You need two: GalaSoft.MvvmLight.dll and GalaSoft.MvvmLight.Extras.dll. In addition, you need the System.Windows.Interactivity.dll which contains the base code for all behaviors. Then, add the namespace in the resource dictionary:  


jueves, 30 de septiembre de 2010

Expert system to advise recipes

I did this funny project in 2005 for university. The main feature of this project is that the project was done using bayesian network in order to make decisions and a language based on rules as CLIPS. Therefore, the system is able to make a decision depending if the user prefers more greasy or more calories and so on, being careful not repeat a made decision in last days and if the user has the enough ingredients in the warehouse.

miércoles, 29 de septiembre de 2010

Algorithms evolutionary models

This post presents a platform for the design of composite materials based on evolutionary models that I did several years ago for my end career project.
The use of composite materials, for the manufacture of structural elements, has increased significantly, so that many of the traditional materials such as steel, wood or aluminum, have been giving way to these new materials, also known as composites, to achieve better properties.
But, there are many difficulties associated with the production of a composite, because the design of a new design element involves not only the geometry of each fiber, but you also have to design the configuration of the material itself. All this, in order to support all pressures from every angles.