/// <summary>
/// Gets the value of the <strong>AttachedDataContext</strong> attached property from a given
/// <see cref="DependencyObject"/> object.
/// </summary>
/// <param name="obj">The object from which to read the property value.</param>
/// <return>The value of the <strong>AttachedDataContext</strong> attached property.</return>
/// <exception cref="ArgumentNullException">
/// <paramref name="obj"/> is <see langword="null"/>.
/// </exception>
public static object GetAttachedDataContext(DependencyObject obj)
{
if (obj == null)
throw new ArgumentNullException("obj");
return obj.GetValue(AttachedDataContextProperty);
}