【发布时间】:2015-05-29 07:51:07
【问题描述】:
我定义了一个自定义画笔,如 How to define and use resources in xaml so they can be used in C# 中所述。
但是,当我尝试将其分配给 Shape.Fill 或 Shape.Stroke 属性时,如下所示:
<Rectangle Stroke="MyBrush"/>
我的应用程序因XamlParseException 而崩溃。那么如何只使用 XAML 代码来分配自定义画笔呢?
【问题讨论】: