What you can do is create a Menu in XAML and name it something which you can refer to. In the code behind, you can create
MenuItem
as per your database records. And set the tag to identify what the
MenuItem
is - lets suppose you assign ID of the record to it. Handle the
Click
event of it and get the ID which is stored in it using the
sender
object and casting it into
MenuItem
. Then use the proper cases for which page to navigate etc.
For more information on
MenuItem
, check it out
here.[
^]