Possible Duplicate:
When to use Dependency Properties
i read about WPF dependency property but just could not understand it well what is dependency property and why it is required. when to use dependency property i means what kind of situation one should go for dependency property.
here is a sample code for dependency property
public static readonly DependencyProperty IsSpinningProperty =
DependencyProperty.Register(
"IsSpinning", typeof(Boolean),
);
public bool IsSpinning
{
get { return (bool)GetValue(IsSpinningProperty); }
set { SetValue(IsSpinningProperty, value); }
}
please help me to understand the dependency property with a easy sample code and also show me how application will be benifited. when it is required etc.
thanks