I'm Developing windows phone 8.1 application when i want to start emulator Give me this error "Type expected" line 27 this is the line of code:
statusBar.BackgroundColor = new ((SolidColorBrush)Windows.UI.Xaml.Application.Current.Resources["PhoneAccentBrush"]);
`
You're trying to use the new
operator, which requires a type, like this:
variable = new SomeType(constructorArguments);
You've got new
and then a cast.
I suspect you just want the cast, without new
:
// With a using directive for Windows.UI.Xaml...
statusBar.BackgroundColor = (SolidColorBrush) Application.Current.Resources["PhoneAccentBrush"];
See more on this question at Stackoverflow