Saving visual tree as XAML