user8741522
user8741522

Reputation:

CoreApplication error in UWP

I try to draw into my tittle bar the of my app the background using this code

CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = true;

And got this error

'CoreApplication' does not exist in the current context

Any suggestions please??

Upvotes: 0

Views: 279

Answers (1)

Sunteen Wu
Sunteen Wu

Reputation: 10627

It seems like you just don't reference the correspondent namespace. CoreApplication class is belong to namespace Windows.ApplicationModel.Core. Simply add the namespace using at the top of the code file as follows:

using Windows.ApplicationModel.Core;

When you hover on the error line, the Visual Studio will mentioned the potential fix.

Upvotes: 3

Related Questions