我有一些基本的编译问题定义一个BorderBrush



我在定义BorderBrush时有一些基本的编译问题。

http://msdn.microsoft.com/en-us/library/system.windows.controls.border.borderbrush.aspx声明你像这样定义一个borderbrush:

myBorder1 = new Border();
myBorder1.BorderBrush = Brushes.SlateBlue;
但是在我的代码中,当我尝试
border1.BorderBrush = Brushes.SlateBlue;

Error 1 The name 'Brushes' does not exist in the current context我已经包括了命名空间System.Windows.Controls作为文件顶部的"using"语句以及项目的参考资料。我错过了什么?

try

myBorder1.BorderBrush = new SolidColorBrush(Colors.SlateBlue);

Silverlight没有Brushes

画笔在System.Drawing…我默认有,也许你把它拿走了??

相关内容

最新更新