Laying out the contents
This last section is about making the app look a bit nicer. We will just scratch the surface of the possibilities here, but this should give you some ideas about how styling works.
Setting an application-wide background color
Styles are a great way of applying styling to elements. They can be applied either to all elements of a type or the elements referenced by a key if you add an x:Key
attribute:
- Open
App.xaml
. - Add the following XAML, which is in bold, to the file:
<ResourceDictionary> Â Â <Style TargetType="NavigationPage"> Â Â Â Â <Setter Property="BarBackgroundColor" Value="#A25EBB" /> Â Â Â Â <Setter Property="BarTextColor" Value="#FFFFFF" /> Â Â </Style> Â Â <Style x:Key="FilterButton" TargetType="Button"> Â Â Â Â <Setter Property="Margin" Value=...