summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Tizen/Renderers
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Platform.Tizen/Renderers')
-rw-r--r--Xamarin.Forms.Platform.Tizen/Renderers/BoxViewRenderer.cs18
-rw-r--r--Xamarin.Forms.Platform.Tizen/Renderers/ViewRenderer.cs2
2 files changed, 9 insertions, 11 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/BoxViewRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/BoxViewRenderer.cs
index b0651340..6d3ed38e 100644
--- a/Xamarin.Forms.Platform.Tizen/Renderers/BoxViewRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/BoxViewRenderer.cs
@@ -4,20 +4,18 @@ using ERectangle = ElmSharp.Rectangle;
namespace Xamarin.Forms.Platform.Tizen
{
- public class BoxViewRenderer : VisualElementRenderer<BoxView>
+ public class BoxViewRenderer : ViewRenderer<BoxView, ERectangle>
{
- ERectangle _control;
-
public BoxViewRenderer()
{
}
protected override void OnElementChanged(ElementChangedEventArgs<BoxView> e)
{
- if (_control == null)
+ if (Control == null)
{
- _control = new ERectangle(Forms.Context.MainWindow);
- SetNativeControl(_control);
+ var rectangle = new ERectangle(Forms.Context.MainWindow);
+ SetNativeControl(rectangle);
}
if (e.NewElement != null)
@@ -54,19 +52,19 @@ namespace Xamarin.Forms.Platform.Tizen
if (Element.BackgroundColor.IsDefault)
{
// Set to default color. (Transparent)
- _control.Color = EColor.Transparent;
+ Control.Color = EColor.Transparent;
}
else
{
// Use BackgroundColor only if color is default and background color is not default.
- _control.Color = Element.BackgroundColor.MultiplyAlpha(Element.Opacity).ToNative();
+ Control.Color = Element.BackgroundColor.MultiplyAlpha(Element.Opacity).ToNative();
}
}
else
{
// Color has higer priority than BackgroundColor.
- _control.Color = Element.Color.MultiplyAlpha(Element.Opacity).ToNative();
+ Control.Color = Element.Color.MultiplyAlpha(Element.Opacity).ToNative();
}
}
}
-}
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/ViewRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/ViewRenderer.cs
index bf1891bf..f104ba42 100644
--- a/Xamarin.Forms.Platform.Tizen/Renderers/ViewRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/ViewRenderer.cs
@@ -7,7 +7,7 @@ namespace Xamarin.Forms.Platform.Tizen
/// </summary>
public abstract class ViewRenderer<TView, TNativeView> : VisualElementRenderer<TView>
where TView : View
- where TNativeView : Widget
+ where TNativeView : EvasObject
{
GestureDetector _gestureDetector;