Difference between Xaml System.Xaml and System.Windows.Markup readers?

There are two Xaml readers. One of them is included in System.Xaml, the other - in System.Windows.Markup. What is the difference between the two?

+4
source share
1 answer

Taken from MSDN :

Types of WPF and WPF technology in common support concepts that rely on access to internal WPF components. For example, how WPF implements dependency properties depends on internal methods to efficiently search for item types. Access to these internal elements is provided through the XAML reader and writer API provided to XamlWriterand XamlReaderfrom the namespace System.Windows.Markupand PresentationFramework. However, lower level XAML readers and assembly XAML writers System.Xaml(based on classes System.Xaml.XamlReader, System.Xaml.XamlWriter) do not have access to the internal components of WPF . No dependency on System.Xamlany WPF-specific assembly. Without access to internal WPF componentsSystem.Xamlreaders and writers cannot properly load or save all WPF types or WPF type-based types. In particular, readers and writers System.Xamldo not understand concepts such as the WPF dependency property property property repository, or all the features of how WPF uses styles, resource dictionaries, and templates. Therefore, you have a choice:

  • If you are loading WPF types and / or using XAML in BAML form, use PresentationFramework XAML readers and XAML entries.
  • If you do not rely on any type of WPF or BAML form of XAML and do not use other technology for reading a XAML reader or XAML record for reasons specific to this structure, use the System.Xamlauthors of XAML and XAML.
+2
source

Source: https://habr.com/ru/post/1543512/


All Articles