Hi all,
In our current system (using Visual FoxPro), we populate Menu of the system dynamically by retrieving source data from database.
We will stored the Menu Name, Code, sorting order, hierarchy or whatsoever in a table in SQL server database, retrieve them during system initialisation and populate the menu on run time.
We like to do it this way, because whenever there are new module developed, we will just add in additional record in Database, and it will automatically in our System, without changing code.
Now we are moving to C# & WPF (XAML), and still prefer to do it this way.
I have done some research, and manage to populate the Menu & Menu Item successfully from database, except the Command for individual Menu Item.
Let's say I have this menu Item called "Invoice Entry", what i want it to happen is, when I clicked on this menu item, it will open another small module(Invoice.xaml).
Something like " Invoice a = new Invoice() ; a.ShowDialog(); "
How do I stored command in Database and dynamically assign this command to menuitem during run time?
Any keyword, term that could help me research on the web?
Sorry for my bad english :-)
Thank you