c# - 如何知道 wpf 应用程序是否在终端服务 session 中?

标签 c# wpf wpf-controls

是否有等价于

SystemInformation.TerminalServerSession 在 wpf 中?

我想知道当前的 wpf 应用程序是否正在终端服务器 session 中运行。 谢谢

最佳答案

您可以使用 SystemParameters 类来查询系统设置,尤其是 SystemParameters.IsRemoteSession属性获取指示调用进程是否与终端服务客户端 session 关联的值(如 SystemInformation.TerminalServerSession 属性)。

关于c# - 如何知道 wpf 应用程序是否在终端服务 session 中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10013205/

相关文章:

c# - Linq 将一对多关系减少为一对一

c# - Filehelpers CSV 解析。如何使用 FieldQuoted 属性?

c# - 当投影到 Dto 时,如何动态构建 'where' 子句?

wpf - 如何使 WPF 中的控件调整大小等同于 Windows 窗体的 anchor /停靠属性?

c# - 如何在运行时在 xaml 中将特定单词作为超链接

c# - WPF 无法设置组合框的选定项

c# - 图片上传和图片 slider

c# - 将字符串转换为列表

wpf - 如何将 Entity Framework 中的实体绑定(bind)到 DataGrid?

wpf - 如何在 RichTextBox 中以编程方式移动插入符位置?