using Xamarin.Forms.Platform.Tizen.Native;
using Tizen.Xamarin.Forms.Extension;
using Tizen.Xamarin.Forms.Extension.Renderer;
+using ESize = ElmSharp.Size;
+using Size = Xamarin.Forms.Size;
using TForms = Xamarin.Forms.Platform.Tizen.Forms;
[assembly: ExportRenderer(typeof(RadioButton), typeof(RadioButtonRenderer))]
+
namespace Tizen.Xamarin.Forms.Extension.Renderer
{
public class RadioButtonRenderer : ViewRenderer<RadioButton, Radio>
{
textblock.TextStyle = textStyle;
}
+
Control.EdjeObject.EmitSignal(emission, "elm");
}
+
+ protected override Size MinimumSize()
+ {
+ return Measure(Control.MinimumWidth, Control.MinimumHeight).ToDP();
+ }
+
+ protected override ESize Measure(int availableWidth, int availableHeight)
+ {
+ var size = Control.Geometry;
+
+ Control.Resize(availableWidth, size.Height);
+
+ var formattedSize = Control.EdjeObject["elm.text"].TextBlockFormattedSize;
+
+ Control.Resize(size.Width, size.Height);
+
+ return new ESize()
+ {
+ Width = Control.MinimumWidth + formattedSize.Width,
+ Height = Math.Max(Control.MinimumHeight, formattedSize.Height),
+ };
+ }
}
internal class RadioGroupManager
}
}
}
-}
+}
\ No newline at end of file