Using styles to customize appearance
- PDF for offline use
Let us know how you feel about this
last updated: 2016-02
Xamarin.Forms applications often contain multiple controls that have an identical appearance. Setting the appearance of each individual control can be repetitive and error prone. Instead, styles can be created that customize control appearance by grouping and settings properties available on the control type.
An explicit style is one that is selectively applied to controls by setting their
An implicit style is one that's used by all controls of the same
TargetType, without requiring each control to reference the style.
Styles can be made available globally by adding them to the application's
ResourceDictionary. This helps to avoid duplication of styles across pages or controls.
Styles can inherit from other styles to reduce duplication and enable reuse.
Styles do not respond to property changes, and remain unchanged for the duration of an application. However, applications can respond to style changes dynamically at runtime by using dynamic resources.