Example #1
0
        public MainWindow()
        {
            InitializeComponent();
            Village = new Village();
            var peopleViewer = new PeopleViewer(Village.Villagers);

            Grid.SetColumn(peopleViewer, 1);
            MainGrid.Children.Add(peopleViewer);
        }
        /*public ActivityType SelectedActivityType { get; set; }
         * public IEnumerable<ActivityType> ActivityTypes
         * {
         *  get
         *  {
         *      return Enum.GetValues(typeof(ActivityType)).Cast<ActivityType>();
         *  }
         * }*/

        public PlanActivity(IList <Person> people)
        {
            InitializeComponent();
            this.DataContext = this;
            var peopleView = new PeopleViewer(people);

            peopleView.SelectionMode = SelectionMode.Multiple;
            Grid.SetColumn(PeopleViewGrid, 0);
            PeopleViewGrid.Children.Add(peopleView);

            ActivityTypes.ItemsSource = Enum.GetValues(typeof(ActivityType)).Cast <ActivityType>();
        }