summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls/GalleryPages/StyleGallery.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Controls/GalleryPages/StyleGallery.cs')
-rw-r--r--Xamarin.Forms.Controls/GalleryPages/StyleGallery.cs41
1 files changed, 41 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls/GalleryPages/StyleGallery.cs b/Xamarin.Forms.Controls/GalleryPages/StyleGallery.cs
new file mode 100644
index 00000000..6ae2d846
--- /dev/null
+++ b/Xamarin.Forms.Controls/GalleryPages/StyleGallery.cs
@@ -0,0 +1,41 @@
+using System;
+
+namespace Xamarin.Forms.Controls
+{
+ public class StyleGallery:ContentPage
+ {
+ public StyleGallery ()
+ {
+ Content = new StackLayout {
+ Children = {
+ new Label {
+ Text = "This uses TitleStyle",
+ Style = Device.Styles.TitleStyle
+ },
+ new Label {
+ Text = "This uses SubtitleStyle",
+ Style = Device.Styles.SubtitleStyle
+ },
+ new Label {
+ Text = "This uses BodyStyle",
+ Style = Device.Styles.BodyStyle
+ },
+ new Label {
+ Text = "This uses CaptionStyle",
+ Style = Device.Styles.CaptionStyle
+ },
+ new Label {
+ Text = "This uses a custom style inherited dynamically from SubtitleStyle",
+ Style = new Style (typeof(Label)) {
+ BaseResourceKey = Device.Styles.SubtitleStyleKey,
+ Setters = {
+ new Setter {Property = Label.TextColorProperty, Value = Color.Pink}
+ }
+ }
+ },
+ }
+ };
+ }
+ }
+}
+