wpf - “FrameworkAppContextSwitches”类型不可访问
问题描述
我正在开发一个 WPF 应用程序。我正在尝试调整TextBox
. 我使用“Style Snooper”来获取该控件的默认样式并将其粘贴到我项目的 App.xaml 文件中(我也为CheckBox
andButton
样式完成了此操作)。
我收到以下错误:
“FrameworkAppContextSwitches”类型不可访问。
在以下代码行:
<DataTrigger Binding="{Binding Path=(msi:FrameworkAppContextSwitches.UseAdornerForTextboxSelectionRendering)}" Value="false" xmlns:msi="clr-namespace:MS.Internal;assembly=PresentationFramework">
如果您需要,我可以发布其余的样式代码,但它有 150 行长,所以我不想弄乱我的问题。
App.xaml 文件的开头如下所示(未引用msi:
):
<Application x:Class="PartsBookAssembler.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:PartsBookAssembler"
xmlns:s="clr-namespace:System;assembly=mscorlib"
Startup="Application_Startup">
我需要什么命名空间引用?有谁知道如何解决这一问题?
解决方案
推荐阅读
- python - MySQLdb在已转义的字符串前面添加字符b - Python
- ios - FBSnapshotTestCase 不会创建 FB_REFERENCE_IMAGE_DIR 和 IMAGE_DIFF_DIR 文件夹
- python - 在 oauth 流中返回用户对象
- h2 - 在 H2 上插入 liquibase 失败,启动期间找不到表
- ruby-on-rails - 简单形式:复选框的值始终为“1”
- c# - 使用基于 Db 上下文连接的 SQL Bulkcopy
- javascript - VS Code JS:为什么/什么时候定义中断?
- php - 如何在几年和几个月内对 Wordpress 帖子进行分组?
- python - 如何计算 3 张图像之间的骰子分数?
- javascript - '预计在箭头函数结束时返回一个值' - 除了过滤器之外还有其他方法吗?