public SourceTextView(ITextAreaHandler handler) { Delegate = new SourceTextViewDelegate(this) { Handler = handler }; AutoresizingMask = NSViewResizingMask.WidthSizable | NSViewResizingMask.HeightSizable; HorizontallyResizable = true; VerticallyResizable = true; Editable = true; RichText = false; AllowsDocumentBackgroundColorChange = false; Selectable = true; AllowsUndo = true; MinSize = CGSize.Empty; MaxSize = new CGSize(float.MaxValue, float.MaxValue); TextContainer.WidthTracksTextView = true; }