This is a special feature of WPF: no object can be added more than once to the
logical tree of the whole UI (see also:
https://msdn.microsoft.com/en-us/library/ms753391%28v=vs.110%29.aspx[
^]).
On attempt to add a reference to the same UI element in more than two places in the UI, an exception will be thrown. If you want to add several expanders, you have to create several different instances of
System.Windows.Controls.Expander
.
—SA