0

I am having some basic compile issues defining a BorderBrush.

http://msdn.microsoft.com/en-us/library/system.windows.controls.border.borderbrush.aspx
states that you define a borderbrush like this:

myBorder1 = new Border();
myBorder1.BorderBrush = Brushes.SlateBlue;


but in my code, when I try
border1.BorderBrush = Brushes.SlateBlue;
I get
Error 1 The name 'Brushes' does not exist in the current context
and I have included the namespace
System.Windows.Controls
as a "using" statement at the top of the file
as well as a Reference to the project.
What am I missing?

2
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by Momerath
0

Brushes is in System.Windows.Media. The IDE should have put a red underline at the beginning of Brushes and you could hover your mouse over it, click the pop-up and you'd see the option to add the proper using statement.

0

How do I test to see what a borderbrush is set to in Silverlight C#?
(border3.BorderBrush != Colors.Red)
does not work

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.