コード例 #1
0
        public ObservableCollection<OutlookSection> GetOutlookSections()
        {
            var result = new ObservableCollection<OutlookSection>();

            var mailViewModel = new MailViewModel();
            result.Add(new OutlookSection
              {
                  Name = "Mail",
                  Content = MailRepository.ParentFolders,
                  IconPath = "../Images/mail_32x32.png",
                  MinimizedIconPath = "../Images/email_16x16.png",
                  ViewModel = mailViewModel
              });

            var viewModel = new CalendarViewModel();
            result.Add(new OutlookSection
            {
                Name = "Calendar",
                Content = viewModel.Resources,
                Command = viewModel.SelectCalendarCommand,
                IconPath = "../Images/calendar_32x32.png",
                MinimizedIconPath = "../Images/calendar_16x16.png",
                ViewModel = viewModel
            });

            return result;
        }
コード例 #2
0
 public NewEmailWindow(MailViewModel viewModel)
     : this()
 {
     this.DataContext = viewModel;
 }