How To: Use Gamertags and Gamer Pictures
Using Gamertags and Gamer Pictures
To retrieve the gamertag and profile picture of a player in a game
Use Gamer.GetProfile to retrieve the profile information for any player in the game.
Note that this method will complete quickly when you use it with a locally signed-in profile. However, this method can take some time if you call it on a remote gamer instance. In the remote case, you might use the non-blocking alternative Gamer.BeginGetProfile.
If the gamer is a SignedInGamer, you can retrieve the local player's preferred settings for gameplay using the SignedInGamer.GameDefaults property. You can also retrieve the local player's privileges using SignedInGamer.Privileges. Unlike Gamer.GetProfile, which can be slow for remote players, the properties of a SignedInGamer return instantly.