Learn how to design applications using Xamarin.Forms dynamic styles and built-in themes. Change the look of your app globally or style it uniquely for each platform.
- [Voiceover] Font size equals 16. Text color equals black. Width equals 300. Height equals 150. Background color equals red. Setting property values on controls is pretty simple, but what if you have hundreds of controls that all need a consistent look and feel, and what happens when design specs change? What happens when an app needs to have a consistent design on one platform, but a totally different consistent design on another? Wouldn't it be cool to just be able to manage all the styles for an app in a single consistent way, and even easily adapt these themes and styles dynamically based on devices and platforms? This is another area where the Xamarin Forms platform really stands out.
I'm Scott J. Peterson and this is Mastering Xamarin Forms Development, Styles and Theming. If you're already familiar with theming concepts in XAML and Windows based development you'll have an easy time transitioning into styles and theming in Xamarin Forms. Xamarin Forms truly provides a rich foundation for unified style and theming experiences. As well as mechanisms like on platform tags that make it extremely simple to provide a specific consistent theming experience for a specific device.
So you could have a totally different style and themed experience for iOS, Android and Windows. And much of the styling can be easily adapted fine tune and even overridden for specific use cases. So let's take a look at what we're going to cover in this session. First we're going to review some general style concepts and walk through the differences between explicit and implicit styles. An area where some developers have some confusion. And we'll talk about this idea of dynamic styles. Something that's important in XAML development.
The ability to adapt to style on the fly within the app experience. And talk about something that's specific to Xamarin Forms, device styles. Then we'll hit the idea of style triggers. Being able to have triggers that are set on style properties to easily adjust a style depending on the state of control. And then we'll walk through actually styling our Xamarin Forms Paperboy app we're working on in this series. Then we're going to move into something that's newer in the Xamarin Forms platform, this idea of global theming and the StyleClass. Being able to apply, for example, a darker light theme across all devices.
So we don't have to worry about micromanaging all of the manifests and all of the markup files for each specific platform. And then we'll go in and update our Xamarin Forms Paperboy app to use some of these built-in theme concepts that are newer in Xamarin Forms. And then finally we're going to talk about special cases for each platform, iOS, Android and Windows. For example, the creation of a splash screen for an Android device that's not really handle out of the box with Android development. Then we'll go in and update our Paperboy app to implement some of these platform specific cases, and even add a splash screen for our Android experience.
And then as always we'll finish up with some great next steps.