- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在使用 SDK 7.1 为 Windows Phone 开发一个简单的应用程序,但出现错误“
XamlParseException, Failed to assign to property 'System.Windows.FrameworkElement.Style' because the type 'System.Windows.Media.Color' cannot be assigned to the type 'System.Windows.Style'."
尝试在 Windows Phone 模拟器上运行应用程序时。我是 WP 的新手,如果能快速回复我将不胜感激..
截图:
最佳答案
问题出在 MainPage.xaml 的第 22 行。
异常告诉我们:您试图将 Color
设置为 UIElement 的
Style 属性。
尝试将 Style
更改为 Background
。
<TextBlock Background="{StaticResource PhoneBorderColor}">
关于c# - 无法分配给属性 'System.Windows.FrameworkElement.Style'(XamlParseException 未处理 :Windows Phone SDK),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12946833/
这个 XAMLParseException 让我抓狂!!我在 Visual Studio 1020 中使用 .NET 3.5 这是我的 xaml:
我正在尝试在我的 Silverlight 应用程序中使用第 3 方组件,当我尝试创建控件的实例时,我收到 XamlParseException: {System.Windows.Markup.Xaml
我在设计自己构建的自定义控件的样式时遇到了一些问题。这是控制源: namespace SilverlightStyleTest { public class AnotherControl: T
我在一个非常简单的 wpf 应用程序中正确地在 xaml 代码或属性窗口中设置了窗口图标属性,但 visual studio 总是在运行时抛出 XamlParseException。为什么会这样?(使
当我打开我的 WPF 窗口时出现了这个错误,我不知道是什么导致了这个错误,也不知道如何消除它。错误突出显示并指向 在底部。 'Initialization of 'Outlook_Add_In_Tes
这个问题在这里已经有了答案: XamlParseException after deploying WPF project (10 个答案) 关闭 8 年前。 当我从应用程序中的另一个窗口显示此窗口
我正在尝试使用默认图标之一作为我的 Xaml 代码中按钮的内容。我真的不明白出了什么问题,因为图像在 UI 伪模拟器中显示时加载正常,但当我尝试部署它时,如果我进入 View ,则会抛出 System
我正在使用以下代码在 Window 或 UserControl 中定义 ImageBrush: 如果我在我的正常应用程序中使用它,效果很好。 但是对于我的测试项目,当我尝试实例化它时,我总是会收到此
此 WPF 应用以 .NET 3.5 为目标,并使用 Visual Studio 2010 的 4.0 工具构建(csc.exe 版本为 4.0.30319.1)。 我不确定我看到的这个异常是怎么回事
我有一个定义了 Style 的 ResourceDictionary,它有一个 ControlTemplate 和一个 Binding StringFormat,如下所示: 我在本地运行,一切正常,
我正在尝试使用 Graph#我的 VSPackage 项目中的库,但不幸的是有一些障碍需要克服。这是我所做的: 我将以下所有 DLL 复制到项目根目录中的文件夹/Libraries 中: GraphS
我正在使用静态资源字典,它按以下方式初始化: static ResourceDictionary resource = new ResourceDictionary() { Source =
我创建了一个绑定(bind)了一些文本框的 WPF 应用程序。我使用验证错误来检查值是否正确。验证查找数据库以查看输入的数据是否存在。 如果我输入一个假值,我的验证错误会捕获错误 whitout 问题
我的应用程序是多窗口的。如果发生 XamlParseException,整个应用程序将关闭。 我最多想做的是关闭“负责”此错误的窗口。 你知道实现这一目标的方法吗? 异常示例: System.Wind
我编写了一个可以在我的开发电脑(Window 7)上安装和运行的应用。 开发环境:安装了 .NET 4 和 .NET 3.5 的 Window 7、VS2010 WPF C# 在其他客户端计算机(XP
我正在尝试设置一个简单的 C# 应用程序,我想在其中记录多个 USB 网络摄像头并将它们的提要保存到一些文件中。我正在使用 AForge.NET,因为这似乎是此类应用程序最流行的选项。我可以使用 AF
我随机收到了这个错误,我不知道如何解决它,因为问题的原因是随机发生的。 任何人都可以指导我应该寻找什么,我认为它指向我的 XAML 代码,但我不知道我应该看什么。 System.Windows.Mar
我在几个不同的 WPF 应用程序中使用了一组非常简单的样式。我将此样式存储在一个通用项目的 Xaml 文件中,然后通过合并到 Resources 中添加在 App.xaml在每个项目中。
我一直在尝试部署我的 WPF 应用程序,我使用安装向导创建了一个安装项目。我添加的唯一项目输出是 Primary。构建此程序并安装程序后,一旦我单击桌面上的 exe,我就会弹出一个“我的程序已停止工作
我想为 Windows 应用商店应用程序创建带有附加属性的自定义文本框。我正在关注this solution 。现在它使用硬编码值作为属性值,但我想使用绑定(bind)来设置值,但它不起作用。我尝试了
我是一名优秀的程序员,十分优秀!