I've found the error and corrected it, Here is a working method for that propose:
public static List<DependencyObject> ListLogical( DependencyObject parent)
{
var depList = new List<DependencyObject>
{
parent
};
foreach ( var child in LogicalTreeHelper.GetChildren( parent ).OfType<DependencyObject>() )
{
depList.AddRange( ListLogical( child ) );
}
return depList;
}
The mistake I done in my first method was that I didn't add the parent itself to the returning list.