I didn't post anything on the blog for a very long time (2010-12-07), so let's break the silence with something new about Caliburn Micro.
In this post, I will briefly show you an update of an "old" article I wrote. The main drawback of the previous version of this dependencies attribute was its inability to make the availability of the action depend on more than one level.
For example, you could write these dependencies, which update the availability of the Do method when either OtherProperty (a property of the same view-model than Do) or OtherProperty.ChildProperty were modified.
[Dependencies("OtherProperty", "OtherProperty.ChildProperty")]
public IEnumerable<IResult> Do()
{
}
With the new Dependencies attribute I'll show you right after the break, you won't be limited to this single level of hierarchy, thus allowing you to write a dependency like:
[Dependencies("OtherProperty.ChildProperty.OneMoreLevelProperty.LastLevelProperty.*")]
public IEnumerable<IResult> Do()
{
}