Exemplo n.º 1
0
 private void DoAddSection(SubSectionType type)
 {
     Items.Add(new SubSectionEntryViewModel(this)
     {
         SectionType = type,
     });
 }
Exemplo n.º 2
0
        /// <summary />
        private IEnumerable <ContentPresenter> CreateControlsThatNeedToBeLaidOut()
        {
            yield return(CreateControlUsingResource(_viewModel, "Print_ProcessSteps"));

            yield return(CreateControlUsingResource(_viewModel, "Print_DocumentInfo"));

            yield return(CreateControlUsingResource(_viewModel, "Print_Accomplishments"));

            yield return(CreateControlUsingResource(_viewModel, "Print_NextTasks"));

            int imageAndBlurbCount = 0;

            foreach (var sectionItem in _viewModel.Sections.Items)
            {
                SubSectionType type = sectionItem.SectionType;
                var            name = $"Print_{type}";

                // we want Image + blurbs to switch between left & right sides
                if (sectionItem.SectionType == SubSectionType.ImageWithCaptionAndBlurb)
                {
                    imageAndBlurbCount++;
                    if (imageAndBlurbCount % 2 == 0)
                    {
                        name += "_Right";
                    }
                }

                yield return(CreateControlUsingResource(sectionItem, name));
            }

            yield return(CreateControlUsingResource(_viewModel, "Print_Reflections"));
        }
Exemplo n.º 3
0
 public SubSectionAttribute(SubSectionType subSection)
 {
     SubSection = subSection;
 }