{
if (Control == null)
{
- SetNativeControl(new UIButton(UIButtonType.System));
+ SetNativeControl(CreateNativeControl());
Debug.Assert(Control != null, "Control != null");
}
}
+ protected override UIButton CreateNativeControl()
+ {
+ return new UIButton(UIButtonType.System);
+ }
+
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
{
base.OnElementPropertyChanged(sender, e);
#endif
NativeColor _defaultColor;
+ protected virtual TNativeView CreateNativeControl()
+ {
+ return default(TNativeView);
+ }
+
public TNativeView Control { get; private set; }
#if __MOBILE__
public override void LayoutSubviews()