Saturday, August 28, 2010

User Experience (UX) Tips (forms consistency)

When deciding to create your application’s forms, be sure to make all or most of related forms have the same page structure and design, why? because this will keep your forms consistent so that users can deal with all of them in the same way, let me show you some real life case to explain the importance of this consistency.

UX Consistency

Driving on different ways example

Say you are a good driver and you know well the way to your work, so you have learned how to avoid roads that have heavy traffic, or roads that might have some maintenance, so you are not focusing on the roads or how to drive, but what if you are going to work in a different way each day, then you will focus on the roads, traffic, radars locations. etc… So you will take a longer time that expected because each day you are experiencing a new way to go to work.

Let’s go back to software and match that case exactly with some web forms in your project

Say you have 2 forms one for adding/ updating countries and the other one for adding/updating measurement units and both forms have only one field for the name of the country and unit respectively. Let’s say that the structure or the design of these two forms is different, (say user will spend 15 min to learn how to deal with that form), so the user is going to spend 15 min learning how to deal with the 1st form and will spend the same time on how to deal with the 2nd form because they are different in design and structure and this will let him feel that your application is too hard to deal with and he may reject your project.
But what about if these two forms have the same design, if the user is going to spend 15 min to learn on of them, he will able to deal with all forms of that type in no time at all. Of course there are special cases you might face but try as much as you can to keep related things look the same.

Friday, August 27, 2010

Make any UI element drag-able in WPF using behaviors

in order to make your UI element drag-able without any extra code, all what you have to do is just selecting behaviors from Assets panel in Expression Blend then drag and drop the MouseDragElementBehavior to your UI element.
for example we will do this to a rectangle here you are the XAML code:

<Rectangle Fill="Red" Stroke="Black" Margin="230,218,172,132"><i:Interaction.Behaviors>
<il:MouseDragElementBehavior/> </i:Interaction.Behaviors>

don't forget to include these namespaces:


if you are working with Expression Blend, they will be placed automatically after setting the drag behavior, and if you are using Visual Studio you will need to set them manually

Wednesday, August 25, 2010

How to create a custom Jumplist with custom events in Windows Forms

Jumplist_App Jumplist

Windows 7 introduced a new set of features one of them (and one of the most prominent feature) is the Jumplist, so we are going to explore the Jumplist features and I will show you how to handle custom events that are fired from custom tasks in the Jumplist.

Click here to view my full article in codeproject and to get the source code of the demo project. I’m waiting for your feedback

Tuesday, August 10, 2010

How to set an alternate row color in SSRS 2005

 I’m going to show you how to set alternate row color in a report that contains data displayed in a table using SSRS 2005
First you will have to select the details row in the design mode, then from the Properties panel select the BackgroundColor property and go to edit its Expression, you will find the default value is Transparent, so replace it with this line of code:
=IIF(RowNumber(Nothing) mod 2, "Wheat""White") and click OK
This line of code is telling the SSRS that if the row number was an odd number then make the row background color is White, else make it Wheat.
Run the solution and Have fun with colors.