gpt4 book ai didi

c# - 如何检查 Windows 设备是手机还是平板电脑/个人电脑?

转载 作者:可可西里 更新时间:2023-11-01 09:47:37 26 4
gpt4 key购买 nike

如何检查 Windows 设备是手机还是平板/PC?我需要知道才能对 xaml 元素使用不同的大小

最佳答案

我想你可以尝试使用EasClientDeviceInformation类:

EasClientDeviceInformation info = new EasClientDeviceInformation();
string system = info.OperatingSystem;

在 WP 上,它应该在桌面上返回 WindowsPhoneWindows

关于c# - 如何检查 Windows 设备是手机还是平板电脑/个人电脑?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30727681/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com