我有一些基本的編譯問題,定義一個BorderBrush。您定義這樣的borderbrush我有一些基本的編譯問題,定義BorderBrush
http://msdn.microsoft.com/en-us/library/system.windows.controls.border.borderbrush.aspx 狀態:
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
作爲 文件頂部的「使用」語句作爲該項目的參考。 我錯過了什麼?
也可能是值得什麼,是的SolidColorBrush在System.Windows.Media。 –