CreateDependencyObjectFromFile() public method

public CreateDependencyObjectFromFile ( string xaml, bool create_namescope, object element_type ) : DependencyObject
xaml string
create_namescope bool
element_type object
return DependencyObject
Ejemplo n.º 1
0
        public async Task <Xap> createFromFile(XamlLoader loader, string filename)
        {
            var xap_dir = await this.Unpack(filename);

            object           element_type = null;
            DependencyObject element      = null;

            if (string.IsNullOrEmpty(xap_dir))
            {
                return(null);
            }

            // Load the AppManifest file
            string manifest = string.Concat(xap_dir, "appmanifest.xaml");

            element = loader.CreateDependencyObjectFromFile(manifest, false, element_type);
            //g_free(manifest);

            if (!(element_type is Deployment))
            {
                return(null);
            }

            // TODO: Create a DependencyObject from the root node.

            Xap xap = new Xap(loader, xap_dir, element);

            return(xap);
        }
Ejemplo n.º 2
0
Archivo: Xap.cs Proyecto: liquidboy/X
        public async Task<Xap> createFromFile(XamlLoader loader, string filename) {

            var xap_dir = await this.Unpack(filename);
            object element_type = null;
            DependencyObject element = null;

            if (string.IsNullOrEmpty(xap_dir)) return null;

            // Load the AppManifest file
            string manifest = string.Concat(xap_dir, "appmanifest.xaml");
            element = loader.CreateDependencyObjectFromFile(manifest, false, element_type);
            //g_free(manifest);

            if (!(element_type is Deployment))
                return null;

            // TODO: Create a DependencyObject from the root node.

            Xap xap = new Xap(loader, xap_dir, element);
            return xap;


        }