private global::Windows.UI.Xaml.Markup.IXamlType CreateXamlType(int typeIndex)
        {
            global::demo.demo_XamlTypeInfo.XamlSystemBaseType xamlType = null;
            global::demo.demo_XamlTypeInfo.XamlUserType       userType;
            string typeName = _typeNameTable[typeIndex];

            global::System.Type type = _typeTable[typeIndex];

            switch (typeIndex)
            {
            case 0:   //  demo.MainPage
                userType           = new global::demo.demo_XamlTypeInfo.XamlUserType(this, typeName, type, GetXamlTypeByName("Windows.UI.Xaml.Controls.Page"));
                userType.Activator = Activate_0_MainPage;
                userType.SetIsLocalType();
                xamlType = userType;
                break;

            case 1:   //  Windows.UI.Xaml.Controls.Page
                xamlType = new global::demo.demo_XamlTypeInfo.XamlSystemBaseType(typeName, type);
                break;

            case 2:   //  Windows.UI.Xaml.Controls.UserControl
                xamlType = new global::demo.demo_XamlTypeInfo.XamlSystemBaseType(typeName, type);
                break;

            case 3:   //  demo.Views.demoApp
                userType           = new global::demo.demo_XamlTypeInfo.XamlUserType(this, typeName, type, GetXamlTypeByName("Windows.UI.Xaml.Controls.Page"));
                userType.Activator = Activate_3_demoApp;
                userType.SetIsLocalType();
                xamlType = userType;
                break;
            }
            return(xamlType);
        }
Пример #2
0
        private global::Windows.UI.Xaml.Markup.IXamlType CreateXamlType(int typeIndex)
        {
            global::demo.demo_XamlTypeInfo.XamlSystemBaseType xamlType = null;
            global::demo.demo_XamlTypeInfo.XamlUserType userType;
            string typeName = _typeNameTable[typeIndex];
            global::System.Type type = _typeTable[typeIndex];

            switch (typeIndex)
            {

            case 0:   //  demo.HubPage
                userType = new global::demo.demo_XamlTypeInfo.XamlUserType(this, typeName, type, GetXamlTypeByName("Windows.UI.Xaml.Controls.Page"));
                userType.Activator = Activate_0_HubPage;
                userType.AddMemberName("NavigationHelper");
                userType.AddMemberName("DefaultViewModel");
                userType.SetIsLocalType();
                xamlType = userType;
                break;

            case 1:   //  Windows.UI.Xaml.Controls.Page
                xamlType = new global::demo.demo_XamlTypeInfo.XamlSystemBaseType(typeName, type);
                break;

            case 2:   //  Windows.UI.Xaml.Controls.UserControl
                xamlType = new global::demo.demo_XamlTypeInfo.XamlSystemBaseType(typeName, type);
                break;

            case 3:   //  demo.Common.NavigationHelper
                userType = new global::demo.demo_XamlTypeInfo.XamlUserType(this, typeName, type, GetXamlTypeByName("Windows.UI.Xaml.DependencyObject"));
                userType.SetIsReturnTypeStub();
                userType.SetIsLocalType();
                xamlType = userType;
                break;

            case 4:   //  Windows.UI.Xaml.DependencyObject
                xamlType = new global::demo.demo_XamlTypeInfo.XamlSystemBaseType(typeName, type);
                break;

            case 5:   //  demo.Common.ObservableDictionary
                userType = new global::demo.demo_XamlTypeInfo.XamlUserType(this, typeName, type, GetXamlTypeByName("Object"));
                userType.DictionaryAdd = MapAdd_5_ObservableDictionary;
                userType.SetIsReturnTypeStub();
                userType.SetIsLocalType();
                xamlType = userType;
                break;

            case 6:   //  Object
                xamlType = new global::demo.demo_XamlTypeInfo.XamlSystemBaseType(typeName, type);
                break;

            case 7:   //  String
                xamlType = new global::demo.demo_XamlTypeInfo.XamlSystemBaseType(typeName, type);
                break;

            case 8:   //  demo.ItemsDetailPage
                userType = new global::demo.demo_XamlTypeInfo.XamlUserType(this, typeName, type, GetXamlTypeByName("Windows.UI.Xaml.Controls.Page"));
                userType.Activator = Activate_8_ItemsDetailPage;
                userType.AddMemberName("NavigationHelper");
                userType.AddMemberName("DefaultViewModel");
                userType.SetIsLocalType();
                xamlType = userType;
                break;

            case 9:   //  demo.Common.BooleanToVisibilityConverter
                userType = new global::demo.demo_XamlTypeInfo.XamlUserType(this, typeName, type, GetXamlTypeByName("Object"));
                userType.Activator = Activate_9_BooleanToVisibilityConverter;
                userType.SetIsLocalType();
                xamlType = userType;
                break;

            case 10:   //  demo.SearchResultsPage
                userType = new global::demo.demo_XamlTypeInfo.XamlUserType(this, typeName, type, GetXamlTypeByName("Windows.UI.Xaml.Controls.Page"));
                userType.Activator = Activate_10_SearchResultsPage;
                userType.AddMemberName("DefaultViewModel");
                userType.AddMemberName("NavigationHelper");
                userType.SetIsLocalType();
                xamlType = userType;
                break;

            case 11:   //  demo.SectionPage
                userType = new global::demo.demo_XamlTypeInfo.XamlUserType(this, typeName, type, GetXamlTypeByName("Windows.UI.Xaml.Controls.Page"));
                userType.Activator = Activate_11_SectionPage;
                userType.AddMemberName("NavigationHelper");
                userType.AddMemberName("DefaultViewModel");
                userType.SetIsLocalType();
                xamlType = userType;
                break;

            case 12:   //  demo.ItemPage
                userType = new global::demo.demo_XamlTypeInfo.XamlUserType(this, typeName, type, GetXamlTypeByName("Windows.UI.Xaml.Controls.Page"));
                userType.Activator = Activate_12_ItemPage;
                userType.AddMemberName("NavigationHelper");
                userType.AddMemberName("DefaultViewModel");
                userType.SetIsLocalType();
                xamlType = userType;
                break;
            }
            return xamlType;
        }