A style sheet is no good on its own. We need to apply it to our application. We also need to set some styling on NavigationPage here as well, since we can't gain access to it from the CSS directly.
We will be adding some resources and a reference to the style sheet. Copy the code that follows and refer to these steps to study what each line does:
- Open the App.xaml file in the Chat project.
- In the Application.Resources node, add a <StyleSheet Source="/Css/Styles.css" /> node to reference the style sheet.
- The next node we need to work on is the StyleSheet node. Add a Style node with TargetType set to "NavigationPage". Create a setter for the BarBackgroundColor property with a value of "#273E47" and a setter for the BarTextColor property with a value of "White".
The App.xaml file should now look as follows:
<?xml version="1.0" encoding="utf-8"?>
<Application xmlns="http:...