Budgeter 5000 - A Budgeting Prism 6 Windows Application Part 5, Register View


Budgeter 5000 will have a register page to enter the transactions over time.



The top has a button area for saving the records.  There is a filter drop down for displaying only certain account type transactions.  And there is a data grid to display the records.

Register control


Custom Xaml

The register page contains a bunch of custom Xaml in order to show the combobox values.  


Enum Combobox - Type

The Xaml below creates a resource with an Enum named ModifierType.


This resource is used in the data grid.  

Type Combobox


Dynamic Combobox Account Name

The Account Name combobox uses the view model to populate it's drop down values.  The AccountList contains the values and returns an ID which is bound to (Transaction.)AccountID.

Originally I tried to return the Account object, but through a few weeks of attempting different ways, I think it may be impossible.

Account name Xaml

Here is the definition for the AccountList. 

 Account list definition



I utilize the built in data picker control for proper data formatting and selection.




I bind the text based fields with a normal binding.



Register View Model 

The register view model is initialized with two services injected with it.  A delegate command is created to call the save transaction method when the save button is pressed from the Register view.

Register view model constructor


Get Transactions

We use the Prism 6 navigation interface and the transaction service to get the transaction data.  We attach to an event to capture when a new record is added.

Register OnNavigateTo



The collection changed event listens for new records and then adds a unique Guid and the current date.



Register Page Running

Here is the Register page running with a few records entered.

Register page


The complete source code for this project is located on Github.



If you found this article helpful use the tweet button below to spread the word.  Thank you.


Leave your comment