示例#1
0
            public DesignerListViews()
            {
                Control control = null;

                control = new AllListView(new ListViewModel("All", itemService));
                this.Add(control);
                control = new RecentListView(new ListViewModel("Recent", itemService));
                this.Add(control);
                control = new CategoryListView(new CategoryListViewModel("Categorized", itemService));
                this.Add(control);
            }
示例#2
0
        public void Configure(Container container)
        {
            container.Register <IMessageBoxService>(c => new MessageBoxService());
            container.Register <ITaskDialogService>(c => new MessageBoxService());
            container.Register <INavigationService>(c => new NavigationService());

            container.Register <IEnumerable <object> >("MainListViews", c =>
            {
                Control control         = null;
                List <object> listViews = new List <object>();

                control = new AllListView(new ListViewModel("All", c.Resolve <IItemService>()));
                listViews.Add(control);
                control = new RecentListView(new ListViewModel("Recent", c.Resolve <IItemService>()));
                listViews.Add(control);
                control = new CategoryListView(new CategoryListViewModel("Categorized", c.Resolve <IItemService>()));
                listViews.Add(control);

                return(listViews);
            });
        }