Prevent resizing Editors

This commit is contained in:
Frank A. Krueger 2018-04-15 18:09:09 -07:00
parent 716cea64e9
commit 3c28ae7909
No known key found for this signature in database
GPG Key ID: 0471C67474FFE664
2 changed files with 8 additions and 6 deletions

View File

@ -42,9 +42,11 @@ namespace Ooui.Forms.Renderers
return; return;
if (Control == null) { if (Control == null) {
SetNativeControl (new TextArea { var textArea = new TextArea {
ClassName = "form-control" ClassName = "form-control"
}); };
textArea.Style["resize"] = "none";
SetNativeControl (textArea);
Control.Input += HandleChanged; Control.Input += HandleChanged;
//Control.Started += OnStarted; //Control.Started += OnStarted;

View File

@ -91,17 +91,17 @@ namespace Ooui.Forms.Renderers
Control.Style.BackgroundColor = color.ToOouiColor (); Control.Style.BackgroundColor = color.ToOouiColor ();
} }
protected void SetNativeControl (Ooui.Element uiview) protected void SetNativeControl (Ooui.Element element)
{ {
_defaultColor = Color.FromStyleValue (uiview.Style.BackgroundColor); _defaultColor = Color.FromStyleValue (element.Style.BackgroundColor);
Control = (TNativeElement)uiview; Control = (TNativeElement)element;
if (Element.BackgroundColor != Xamarin.Forms.Color.Default) if (Element.BackgroundColor != Xamarin.Forms.Color.Default)
SetBackgroundColor (Element.BackgroundColor); SetBackgroundColor (Element.BackgroundColor);
UpdateIsEnabled (); UpdateIsEnabled ();
this.AppendChild (uiview); this.AppendChild (element);
} }
public override void SetControlSize (Size size) public override void SetControlSize (Size size)