I'm using a dictionary to populate the list contents using the user details from my login page.
However I need to create a separate source page for every list item.
At the moment the page loads a static source page, is there anyway I can set this dynamically i.e. a source page per created list link?
Alternatively if I can get the name of the current selected task from the list it would be awesome.
Here's a link to the project folder
Image of list page (Each list link has the same source page)
public void PopulateList()
{
List<Dictionary<string, string>> tasks = dbConnect.Select("Tasks", "OwnerID = " + userID + "", "task_name, risk_percentage", "ID");
foreach (Dictionary<string, string> task in tasks)
{
Link taskItem = new Link();
//Task_Page taskPage = new Task_Page();
Uri taskPageURL = new Uri("Pages/Task Page.xaml", UriKind.Relative);
taskItem.Source = taskPageURL;
taskItem.DisplayName = task["task_name"] + " " + task["risk_percentage"] + "%";
listItems_list.Links.Add(taskItem);
}
}