Friday, June 3, 2011

Double dependency property causing exception!

background

Hi , today I am going to share a small tips, its about dependency property, here is what I added in my presenter, looks like a innocent dependency property to me.

CenterX DependencyProperty

public double CenterX
{
get { return (double)GetValue(CenterXProperty); }
set { SetValue(CenterXProperty, value); }
}

public static readonly DependencyProperty CenterXProperty =
DependencyProperty.Register("CenterX", typeof(double),
typeof(MainWindowPresenter), new UIPropertyMetadata(0));



In first thought I found not problem in this code, but when I run the code end up with a the following exception,


image


In fact I didn’t now that it happen because of the dependency property, I was banging my head on the wall for few minutes when I saw this exception window. I commended lots of code that I wrote since the last commit and successful run. And when I start commenting one by one code segment, and finally found out that dependency property.


The want’s wrong with it?


It took a while to figure out what is wrong with it, I have rewritten the property with a minor change, can you see what is changed in the following code?


public double CenterX
{
get { return (double)GetValue(CenterXProperty); }
set { SetValue(CenterXProperty, value); }
}

public static readonly DependencyProperty CenterXProperty =
DependencyProperty.Register("CenterX", typeof(double),
typeof(MainWindowPresenter), new UIPropertyMetadata(0d));


Yes a simple change first time it was 0 how 0d on UIPropertyMetaData. Yes this is a simple change but took a while to figure it out.


Hope you wont loss you time with this kind of mistake, always use 0d or some (doublevalue)d when initializing a double dependency property.


Until next time bye bye.

Thursday, May 5, 2011

Balsamiq: Another mockup building tool for all kind of purpose.

Today I am going to share yet another mockup building tool with you guys. Before going in to more discussion, can you recall any good mockup tool free, i.e. either freeware or shareware three year back. We used Microsoft Visio for a long time. Until our designers made up there mind to do all sort of mockup using Photoshop. Again considering the price of the tool Photoshop was a good choice as it serve multiple purpose for the designers.

The tool or component that I want to share with you guys is Balsamiq. It is yet another mockup building tool and I must say a very good one. I have already talking about mockupbuilder.com where a silverlight component do all the thing for mockup. Here we can say that it’s a competitor for the mocupbuilder.com, Balsamiq is designed and developed via flex(Perhaps) and has runtime framework as adobe Air.

Its free if you use this by lunching from there site, and you can also buy the commercial version with $79 for a single license. Till now our designers are using this free version and They are pretty happy about it.

image

On thing I must mention here that not only designers are comfortable with it, stake holders like developers and product owners even customers understand the simple sketch like drawing. As our project manager said

“Even though the name sounds funny but the tool is awesome and we are liking it”

Until next time me signing our.

Between Extension method for double

This is a work in progress and can be used for only numeric data types. And also works with all the object that implements IComparable.

Works for almost every case and it is pretty handily.

/// <summary>
/// Extention method for between
/// </summary>
public static class SomeExtention
{
public static bool Between<T>(this T actual, T lower, T upper) where T : IComparable<T>
{
return actual.CompareTo(lower) >= 0 && actual.CompareTo(upper) <= 0;
}
}


Looking forward to share more about this stuff. Until next time bye bye.

Friday, April 8, 2011

Trello an excellent example of awesome scrum/Kanban digital board

 

Today I want to share a really interesting tool with the community. Its simple, its easy, its really user friendly its Trello. From the makers of FogBugz yet another awesome tool to ease the developers life. It’s a free tool, at least till now you can create and manage multiple boards. Typically a organization have multiple ongoing projects, and this tool also support multiple boards.

image

We can create as many columns depending on our needs. For instance. Back lock, Hotbox , In Development, Pre-QA, Under –QA, Finished, etc. We are trying to use this for our small projects till now, but it has huge potential to manage big size projects. I am looking forward to get some velocity calculation and advanced reporting features in future.

Till Next time. Its me signing out.

Friday, March 4, 2011

Mockup builder : Yet another awesome mockup building tool for your software.

In one of my last post I have discussed about an interesting web based tool to design and manage project the creately project to be precise. In this post I want to share another tool, I really find this tool useful, there is a whole lot of tools and controls set to build any kind of mockup. And I found this a perfect replacement of visio. but I must mention one point here before the continuation of the post, its Free!, its still in beta state though, hope this will be free in the release version also.

image

This tool is written entirely in Silverlight, and must say this is an state of art example what Silverlight can do, this project has also has out of browser experience so you can also install this in your local machine for offline browsing. you guys can checkout this tool from http://mockupbuilder.com/.

image

Some very interesting feature is that you can create project and design multi-screen mockups. I hope this tool will be free for use as long as it remains.

Friday, February 11, 2011

Use Creately to manage your software artifacts

This is a interesting tool, a full web based UML, and other diagrams designer tool, just like mockupbuilder. you can checkout this tool at http://creately.com/.

You would be surprised to see the client list of this tool. And some surprising integration with your existing collaboration tool.

image

But for uses we have a simple problem, that’s money proportional to extendibility. This tool has some basic free service but for advanced services you have to use the commercial stuff. Why we don’t have free stuff? its because the world will not give us the basic needs for free so some one have to do business to make money.

Did I mention that you can build your software mockup as well, in this tool apart from doing awesome collaboration. And not to mention it has a desktop version as well, incase you want to replace MS Visio with Creately.

“I dream of a all free software world.”