From 723d09c73bea090b1bfc0180c96459a06e09e4a5 Mon Sep 17 00:00:00 2001 From: Daniel Sandberg Date: Mon, 14 May 2018 21:26:19 +0200 Subject: [PATCH] Added some styles Added mapping StyleId -> ClassName --- Ooui.Forms/VisualElementRenderer.cs | 4 ++++ Ooui/Style.cs | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/Ooui.Forms/VisualElementRenderer.cs b/Ooui.Forms/VisualElementRenderer.cs index fec2b1d..9570549 100644 --- a/Ooui.Forms/VisualElementRenderer.cs +++ b/Ooui.Forms/VisualElementRenderer.cs @@ -115,6 +115,7 @@ namespace Ooui.Forms } element.PropertyChanged += _propertyChangedHandler; + ClassName = Element?.StyleId; } OnElementChanged (new ElementChangedEventArgs (oldElement, element)); @@ -143,6 +144,9 @@ namespace Ooui.Forms else if (e.PropertyName == Layout.IsClippedToBoundsProperty.PropertyName) { //UpdateClipToBounds (); } + else if (e.PropertyName == "StyleId") { + ClassName = Element?.StyleId; + } } protected virtual void OnRegisterEffect (PlatformEffect effect) diff --git a/Ooui/Style.cs b/Ooui/Style.cs index 13e11b5..5a83415 100644 --- a/Ooui/Style.cs +++ b/Ooui/Style.cs @@ -20,6 +20,10 @@ namespace Ooui get => this["align-self"]; set => this["align-self"] = value; } + public Value BackfaceVisibility { + get => this["backface-visibility"]; + set => this["backface-visibility"] = value; + } public Value BackgroundColor { get => this["background-color"]; @@ -288,6 +292,11 @@ namespace Ooui } } + public Value Perspective { + get => this["perspective"]; + set => this["perspective"] = value; + } + public Value Position { get => this["position"]; set => this["position"] = value; @@ -323,6 +332,17 @@ namespace Ooui set => this["transform-origin"] = value; } + public Value TransformStyle { + get => this["transform-style"]; + set => this["transform-style"] = value; + } + + public Value Transition + { + get => this["transition"]; + set => this["transition"] = value; + } + public Value VerticalAlign { get => this["vertical-align"]; set => this["vertical-align"] = value;