That’s what I was looking for:
http://automapper.codeplex.com/
it allows that: Using AutoMapper to map view models in ASP.NET MVC
For a little more theory about the subject, it’s here.
Now, I just have to use it!
Interesting article about ASP.NET extensibility. Read here.
Interesting article, could be useful for some very big apps in javascript…
Posted on December 9th, 2010 in WPF | No Comments »
In order to get notified when a dependency property value changes, you can use the DependencyPropertyDescriptor.AddValueChanged function to register your own listener.
A simple example that displays the width of the window in a label:
public Window1()
{
InitializeComponent();
DependencyPropertyDescriptor widthDesc = DependencyPropertyDescriptor.FromProperty(Window.WidthProperty, typeof(Window));
if (widthDesc != null)
{
widthDesc.AddValueChanged(this, this.OnValueChanged);
}
}
private void OnValueChanged(object sender, EventArgs args)
{
txtLabel.Text = this.Width.ToString();
}