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

IconFont2Code, my open-source tool in order to view icons in font files and create C# class with the glyph constants

Problems

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