コード例 #1
0
ファイル: OverviewView.cs プロジェクト: jorik041/NycCodeCamp8
        private void loadData()
        {
            Root.Clear();
            Root.Add(
                from slot in (ViewModel.TimeSlots ?? new List <TimeSlot>())
                select new CommandBindableSection <SessionElement>("", ViewModel.ViewSessionCommand)
            {
                ItemsSource = slot.Sessions,
                HeaderView  = AppStyles.CreateListHeader(string.Format("{0} - {1}", slot.StartTime.FormatTime(), slot.EndTime.FormatTime()), UITableViewStyle.Plain)
            }
                );

            var fullScheduleSection = new Section
            {
                HeaderView = new UIView(new RectangleF(0, 0, UIScreen.MainScreen.Bounds.Width, 33))
                {
                    BackgroundColor = UIColor.Clear
                }
            };

            fullScheduleSection.Add(
                new StyledStringElement("See full schedule")
            {
                Accessory       = UITableViewCellAccessory.DisclosureIndicator,
                SelectedCommand = ViewModel.ViewFullScheduleCommand,
                BackgroundColor = AppStyles.SemiTransparentCellBackgroundColor,
                TextColor       = AppStyles.ListTitleColor,
                Font            = AppStyles.ListTitleFont
            }
                );
            Root.Add(fullScheduleSection);
            ReloadData();
        }
コード例 #2
0
 private void loadSessions()
 {
     Root.Clear();
     Root.Add(
         from slot in ViewModel.TimeSlots
         select new CommandBindableSection <SessionElement>("", ViewModel.ViewSessionCommand)
     {
         ItemsSource = slot.Sessions,
         HeaderView  = AppStyles.CreateListHeader(string.Format("{0} - {1}", slot.StartTime.FormatTime(), slot.EndTime.FormatTime()), UITableViewStyle.Plain)
     }
         );
     ReloadData();
 }
コード例 #3
0
 private void loadSponsors()
 {
     Root.Clear();
     Root.Add(
         from tier in ViewModel.SponsorTiers
         select new CommandBindableSection <SponsorElement>("", ViewModel.ViewSponsorCommand)
     {
         ItemsSource = tier.Sponsors,
         HeaderView  = AppStyles.CreateListHeader(tier.Name, UITableViewStyle.Plain)
     }
         );
     ReloadData();
 }