Exemplo n.º 1
0
        public SubSectionEntryViewModel(SectionsViewModel owner)
        {
            Owner     = owner;
            ListItems = new ListCollectionViewModel();
            AllImages = new ObservableCollection <ImageReference>()
            {
                new ImageReference(),
            };

            AddImageCommand    = new DelegateCommand(DoAddImage);
            RemoveImageCommand = new DelegateCommand <ImageReference>(DoRemove);

            AllImages.CollectionChanged += delegate { OnPropertyChanged(nameof(Image)); };

            MoveImageUpCommand   = new DelegateCommand <ImageReference>(DoMoveImageUp);
            MoveImageDownCommand = new DelegateCommand <ImageReference>(DoMoveImageDown);
        }
Exemplo n.º 2
0
        public PageEntryViewModel()
        {
            ItemsAccomplished   = new ListCollectionViewModel();
            NextSteps           = new ListCollectionViewModel();
            AttendanceViewModel = new AttendanceViewModel();
            Sections            = new SectionsViewModel();

            Category = Category.AvailableCategories.FirstOrDefault();

            ProcessSteps = new BindingList <ProcessStep>(
                AppConfigurationSettings.Instance.ProcessSteps
                .Select(s => new ProcessStep(s))
                .ToList()
                );

            ProcessSteps.ListChanged += delegate { OnPropertyChanged(nameof(ProcessSteps)); };
        }