Esempio n. 1
0
            void Init()
            {
                object vm = null;

                if (Factory != null)
                {
                    vm = Factory();
                }
                else if (ViewModelName != null)
                {
                    vm = viewModelLocator.ResolveViewModel(ViewModelName);
                }
                if (vm == null)
                {
                    ModuleInjectionException.NullVM();
                }
                viewModelRef = new WeakReference(vm);
                InitParameter();
                if (string.IsNullOrEmpty(ViewModelName))
                {
                    ViewModelName = viewModelLocator.GetViewModelTypeName(vm.GetType());
                }
                InitViewType();
                InitViewName();
            }