Quantcast
Viewing all articles
Browse latest Browse all 77050

PushModalAsync to get username from new page, then PopModalAsync and use that username

Hi,

I'm trying to do the following, but the async isn't on the page like I was hoping - it's only on the displaying of the page.

var createPlayerPage = new CreatePlayerPage(nPlayerNumber);
await Navigation.PushModalAsync(createPlayerPage).ConfigureAwait(true);
var poppedPage = await Navigation.PopModalAsync();
m_PlayerViewModel.SetPlayerName(nPlayerNumber, ((CreatePlayerPage)poppedPage).Name);

I've only seen this work online by subscribing to an event that the player page fires when it closes, but is there a better way?

Thanks!
Mike


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>