O'Reilly logo

Mastering Xamarin UI Development - Second Edition by Steven F. Daniel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating and implementing Global Styles using XAML

In this section, we will take a look at how to update our application's App.xaml file and define a Global Style that can be used by each of our XAML pages in our TrackMyWalks app. The advantage of declaring a Global Style in your application's App.xaml file is that it helps avoid duplication of styles across each of your pages or the controls that you have defined in these pages.

Whenever you create a Xamarin.Forms application, it is created from a template that uses the App class and implements the Application subclass. In order to create a Global style at the application level, you declare a style in the ResourceDictionary using XAML.

Let's take a look at how we can achieve this by following ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required