/// <summary>
        /// 在此页将要在 Frame 中显示时进行调用。
        /// </summary>
        /// <param name="e">描述如何访问此页的事件数据。
        /// 此参数通常用于配置页。</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            monthToListParam = (MonthToListParam)e.Parameter;
            videomonthlist = GetVideoMonthList(monthToListParam.AllVidellist, monthToListParam.YearIndex, monthToListParam.MonthIndex);
            ShowMonthVideoList.ItemsSource = videomonthlist;
            dateShow.Text = monthToListParam.YearIndex + "." + monthToListParam.MonthIndex;

            if (DisplayInformation.GetForCurrentView().CurrentOrientation != DisplayOrientations.Portrait)
            {
                DisplayInformation.AutoRotationPreferences = DisplayOrientations.Portrait;
            }

            HardwareButtons.BackPressed += HardwareButtons_BackPressed;
        }
Пример #2
0
        private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (ShowMonthList.SelectedItem == null)
                return;

            MonthsData data = ShowMonthList.SelectedItem as MonthsData;
            MonthToListParam param = new MonthToListParam()
            {
                YearIndex = data.YearIndex,
                MonthIndex = data.MonthIndex,
                AllVidellist = allvideolist
            };

            Frame.Navigate(typeof(VideoListPage), param);
        }