Welcome back to the The Globe In My BucketList Application (TGIMBA) Windows Presentation Foundation (WPF) client creation. Tonight will be about the Add functionality.
As with any good design and the Don’t Repeat Yourself (DRY) principal, the Add and Edit functionality will be sharing the same control. To start, I add four controls to the Xaml:
- List Item Name Textbox
- Date Textbox (will be prepopulated and read only)
- Category selection combo box (categories are hot, warm and cold)
- Achieved checkbox (to indicate whether or not the bucket list item has been completed).
I then prepopulate the date and category controls:
The saving of the new bucket list item is done in the view model:
- Using the login steps listed in the previous blog entries, navigate to the Add/Edit screen via the menu on the bucket list view, fill in and click ‘Submit’
- Once saved, scroll to the bottom and verify your item is saved
The edit functionality will be my next post.