Example #1
0
        private void RenderItem()
        {
            var item = new BlockViewEducationalActivity();

            item.Education = Educations.Single(e => e.IdEducation == (int)SelectedIdEducation);
            item.BeginDate = BeginDatePeriod;
            item.EndDate   = IsPeriodEnded ? EndDatePeriod : null;
            item.NameEducationalnstitution = NameEducationalnstitution;
            item.Address           = Address;
            item.VerticalAlignment = VerticalAlignment.Top;
            item.MinWidth          = Grid.ActualWidth - 20;
            item.MaxWidth          = Grid.ActualWidth - 20;
            item.Width             = Grid.ActualWidth - 20;
            item.Margin            = new Thickness(10, 10 + (110 * Items.Count), 10, 0);
            item.Remove            = Remove;
            Grid.Children.Add(item);

            Items.Add(item);

            UpdateListSelectedValues();
            MoveElements();
        }
Example #2
0
        private void GenerateItems()
        {
            SelectedEducationActivities.OrderByDescending(i => i.StartDate);

            for (int i = 0; i < SelectedEducationActivities.Count; i++)
            {
                var item = new BlockViewEducationalActivity();
                item.Education = SelectedEducationActivities[i].Education;
                item.BeginDate = SelectedEducationActivities[i].StartDate;
                item.EndDate   = SelectedEducationActivities[i].EndDate;
                item.NameEducationalnstitution = SelectedEducationActivities[i].NameEducationalnstitution;
                item.Address           = SelectedEducationActivities[i].Address;
                item.VerticalAlignment = VerticalAlignment.Top;
                item.MinWidth          = Grid.ActualWidth - 20;
                item.MaxWidth          = Grid.ActualWidth - 20;
                item.Width             = Grid.ActualWidth - 20;
                item.Margin            = new Thickness(10, 10 + (110 * i), 10, 0);
                item.Remove            = Remove;
                Grid.Children.Add(item);

                Items.Add(item);
            }
        }