Take the 2-minute tour ×

The documentation says

Clone- "Creates a modifiable clone of the System.Windows.Freezable, making deep copies of the object's values. When copying the object's dependency properties, this method copies expressions (which might no longer resolve) but not animations or their current values."

CloneCurrentValue- "Creates a modifiable clone (deep copy) of the System.Windows.Freezable using its current values."

It means both do deep copy. Then what is the difference?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

If I understand the documentation correctly, Clone also copies the binding expressions. So if a property of the object is bound, it remains bound in the copy.

CloneCurrentValues, on the other hand, only copies the current values, as the name implies. Bindings are not kept, so the values in the copy won't be updated if the source of the binding is modified.

share|improve this answer
Thanks! That makes sense, I should have understood it. –  Nitesh Chordiya Apr 22 '11 at 9:04
add comment

Your Answer


