0

I'm developing a universal windows application (on windows 10), with a .NET framework 4.5.2

I'm trying to clone a xaml object using 'XamlWriter' and 'XamlReader', but it seems visual studio has no reference to this class. I'm getting:

The name 'XamlWriter' does not exist in the current context

I've also noticed my visual studio has no System.Windows.Markup namespace (which contains 'XamlWriter' and 'XamlReader'), only System.Windows.Input.

I've searched the web (and here of course), but couldn't find any answers. I would be grateful for any clue.

Thanks.

Thomas Levesque
  • 286,951
  • 70
  • 623
  • 758
Isaac
  • 29
  • 6

1 Answers1

0

The XamlWriter and XamlReader classes are only available in the full .NET framework stack, i.e. WPF, however, it's not implemented for UWA or Silverlight.

There are some workarounds for that, see this for example.

Community
  • 1
  • 1
Shimmy Weitzhandler
  • 101,809
  • 122
  • 424
  • 632