예제 #1
0
        //Will prompt a dialog box for the user to enter in a new list. That list will get added as an element in allStuff.
        private async void MakeNewList_Click(object sender, RoutedEventArgs e)
        {
            InputBox.Text = "";
            ContentDialogResult result = await ListDialog.ShowAsync();

            if (result == ContentDialogResult.Primary && InputBox.Text != "")
            {
                ToDoData myData = new ToDoData
                {
                    Title     = InputBox.Text,
                    ToDoItems = new ObservableCollection <ToDoItem>(),
                    DoneItems = new ObservableCollection <ToDoItem>()
                };
                allStuff.Add(myData);

                if (!haveExplainedList)
                {
                    ModeTip.IsOpen    = false;
                    ListTip.IsOpen    = true;
                    haveExplainedList = true;
                }
            }
        }