获取所有者姓名

Kyl*_*yle 2 c# windows api mobile windows-phone-7

我正在将iPhone游戏移植到Windows Phone 7,我想知道如何获取手机的名称?比如,在iPhone上它就是你在iTunes中设置的名称,并且在API中也可以读取(obj-c ..)[[UIDevice currentDevice] name] ..

任何人都知道等效的WP7 .NET方法/属性?我在MSDN上找不到它们.

Mat*_*cey 6

您可以通过以下方式获取制造商指定的设备名称:

Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceName").ToString();
Run Code Online (Sandbox Code Playgroud)

注意 "There is no standard format for this string. This value may be empty."

更多内容:http://msdn.microsoft.com/en-us/library/ff941122(VS.92).aspx