Esempio n. 1
0
 /// <summary>
 /// Loads XAML from the specified XmlReader and returns the deserialized object.  Any event handlers
 /// are bound to methods defined in the provided module.  Any named objects are assigned to the object.
 ///
 /// The provided object is expected to be the same type as the root of the XAML element.
 /// </summary>
 public static object LoadComponent(CodeContext context, object self, [NotNull] System.Xaml.XamlXmlReader reader)
 {
     if (self == null)
     {
         throw PythonOps.TypeError("expected module, got None");
     }
     return(DynamicXamlReader.LoadComponent(self, context.LanguageContext.Operations, reader));
 }
Esempio n. 2
0
 /// <summary>
 /// Loads XAML from the specified XmlReader and returns the deserialized object.  Any event handlers
 /// are bound to methods defined in the provided module.  Any named objects are assigned to the object.
 ///
 /// The provided object is expected to be the same type as the root of the XAML element.
 /// </summary>
 public static object LoadComponent(CodeContext context, object self, [NotNull] TextReader filename)
 {
     if (self == null)
     {
         throw PythonOps.TypeError("expected module, got None");
     }
     return(DynamicXamlReader.LoadComponent(self, context.LanguageContext.Operations, filename, XamlReader.GetWpfSchemaContext()));
 }