Example #1
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            if (!NavigationContext.QueryString.ContainsKey("newTask"))
            {
                if (_task != null)
                {
                    txtTitle.Text = _task.Title;
                    chkIsDone.IsChecked = _task.IsDone;
                    txtDescription.Text = _task.Description;
                }
            }
            else
            {
                _task = new TaskModel {Id = Guid.NewGuid()};
            }
        }
Example #2
0
 public TaskForm()
 {
     InitializeComponent();
     _task = App.ViewModel.SelectedTask;
 }