Ejemplo n.º 1
0
        internal static void BootstrapCatalog()
        {
            var catalog = new AggregateCatalog();

            catalog.Catalogs.Add(new AssemblyCatalog(typeof(App).Assembly));
            catalog.Catalogs.Add(new AssemblyCatalog(typeof(ShellVM).Assembly));

            Container = new CompositionContainer(
                Mvvm.GetIsInDesignMode() ?
                new MvvmCatalog(catalog, true) :
                new MvvmCatalog(catalog));
        }
Ejemplo n.º 2
0
        public void AddPerson(string name, int initialDebt)
        {
            PersonEntity p = new PersonEntity();

            p.Name  = name;
            p.Debts = new List <DebtEntity>();

            DebtEntity d = new DebtEntity();

            d.Amount = initialDebt;
            d.Date   = DateTime.Now;

            p.Debts.Add(d);

            persons.Add(p);
            Mvvm.UpdateList(new Person(p));
        }
Ejemplo n.º 3
0
 /// <summary>Returns a standard view based on the standard view enumeration</summary>
 /// <param name="standardView">Standard view identifier</param>
 /// <returns>Standard view or null</returns>
 public FrameworkElement GetStandardView(Mvvm.StandardViews standardView)
 {
     if (standardView == Mvvm.StandardViews.None) return null;
     return GetStandardView(standardView.ToString());
 }
Ejemplo n.º 4
0
        public IMvvmContext GetChildContext(string name)
        {
            var ctx = Mvvm.GetNewContext(this, name);

            return(ctx);
        }
 /// <summary>
 /// Returns a standard view based on the standard view enumeration
 /// </summary>
 /// <param name="standardView">Standard view identifier</param>
 /// <returns>Standard view or null</returns>
 public FrameworkElement GetStandardView(Mvvm.StandardViews standardView)
 {
     return standardView == Mvvm.StandardViews.None ? null : GetStandardView(standardView.ToString());
 }
Ejemplo n.º 6
0
 protected override void OnInitServices(Mvvm.IServiceContainer serviceContainer) {
     base.OnInitServices(serviceContainer);
     serviceContainer.RegisterService(new Services.LoadingService(this));
 }
 public App()
 {
     InitializeComponent();
     Mvvm.Init <Startup>();
 }
Ejemplo n.º 8
0
        public void CreateTest()
        {
            view = new Mvvm();

            Assert.NotNull(view);
        }