Click here to Skip to main content
15,881,715 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My solution plays a video and allows the user to click buttons as the video plays recording different statistics. The stats are stored in a List<class>. After a the play and before updating the SQLite Db each stat opens in the ContentDialog box asking for the player. The players are in a GridView on the ContentDialog and the user simply double taps the player and the stat is added to a new list. All of this works fine, but the ContentDialog box is not big enough to host the GridView once it is filled with all of the players. Is there a way to resize this control? If not, is there a way to create a new page/frame that will open async. I call the ContentDialog from a foreach loop and it awaits the return to update the list.

What I have tried:

I tried to change the ContentDialog to a UserControl but I couldn't call it async and this is the key as it is called in the foreach loop to append each list item with the player. I simply use

UserControls.PlayerDG playerDG = new UserControls.PlayerDG();
await playerDG.ShowAsync();
Posted
Updated 28-Dec-18 5:38am

1 solution

With a little more research I found a solution that works for me. The ContentDialog functionally does exactly what I want and I know now it can be used to call a UserControl. Although, the window size does seem to be limited as I had to alter the layout of my control to make everything fit. This way does seem to give me more real estate to work with. Below is the code to use the contentDialog to display a usercontrol

D = new ContentDialog
     {
          Title = GL.Qst + "?",
          Content = new PlayerSelUC()
     };

     await D.ShowAsync();
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900