using Tizen.Xamarin.Forms.Extension;
using Tizen.Xamarin.Forms.Extension.Renderer;
using TForms = Xamarin.Forms.Platform.Tizen.Forms;
+using XColor = Xamarin.Forms.Color;
[assembly: ExportRenderer(typeof(RadioButton), typeof(RadioButtonRenderer))]
+
namespace Tizen.Xamarin.Forms.Extension.Renderer
{
public class RadioButtonRenderer : ViewRenderer<RadioButton, Radio>
void UpdateTextColor()
{
- _span.ForegroundColor = Element.TextColor.ToNative();
+ _span.ForegroundColor = ConvertToNativeColor(Element.TextColor);
}
void UpdateFont()
}
Control.EdjeObject.EmitSignal(emission, "elm");
}
+
+ public Color ConvertToNativeColor(XColor c)
+ {
+ if (c == XColor.Default)
+ {
+ return Color.Default;
+ }
+ else
+ {
+ return new Color((int)(255.0 * c.R), (int)(255.0 * c.G), (int)(255.0 * c.B), (int)(255.0 * c.A));
+ }
+ }
}
internal class RadioGroupManager
}
}
}
-}
+}
\ No newline at end of file