コード例 #1
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            var taskId = long.Parse(e.Parameter.ToString());
            ViewModel = new TaskDetailsPageViewModel(taskId);

            NavInfo.Text = "parameter: " + e.Parameter;
        }
コード例 #2
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            if (Target is TaskDetailsTarget) {
                var taskId = ((TaskDetailsTarget)Target).TaskId;
                ViewModel = new TaskDetailsPageViewModel(taskId);
            }

            if (Target is CommentTarget) {
                var taskId = ((CommentTarget)Target).TaskId;
                var commentId = ((CommentTarget)Target).CommentId;
                ViewModel = new TaskDetailsPageViewModel(taskId, commentId);
            }

            NavInfo.Text = "parameter: " + e.Parameter;
        }