Xamarin.Forms: Apply a global style to any page


The ApplyDerivedTypes attribute of the Style is key in order to have a global style for a ContentPage for example. In order to have a global style for any Page derived class, use the TargetType="Page":

<Style TargetType="Page"
        ApplyToDerivedTypes="True">
    <Setter Property="BackgroundColor"
            Value="White" />
</Style>

Comments

Popular posts from this blog

Xamarin.Forms XmlnsDefinition attribute: All of your namespaces become one

Problems