Mono.TextEditor.TextEditorOptions.CopyFrom C# (CSharp) Method

CopyFrom() public method

public CopyFrom ( TextEditorOptions other ) : void
other TextEditorOptions
return void
		public virtual void CopyFrom (TextEditorOptions other)
		{
			Zoom = other.Zoom;
			highlightMatchingBracket = other.highlightMatchingBracket;
			tabsToSpaces = other.tabsToSpaces;
			indentationSize = other.indentationSize;
			tabSize = other.tabSize;
			showIconMargin = other.showIconMargin;
			showLineNumberMargin = other.showLineNumberMargin;
			showFoldMargin = other.showFoldMargin;
			highlightCaretLine = other.highlightCaretLine;
			rulerColumn = other.rulerColumn;
			showRuler = other.showRuler;
			indentStyle = other.indentStyle;
			fontName = other.fontName;
			enableSyntaxHighlighting = other.enableSyntaxHighlighting;
			colorStyle = other.colorStyle;
			overrideDocumentEolMarker = other.overrideDocumentEolMarker;
			defaultEolMarker = other.defaultEolMarker;
			enableAnimations = other.enableAnimations;
			drawIndentationMarkers = other.drawIndentationMarkers;
			showWhitespaces = other.showWhitespaces;
			includeWhitespaces = other.includeWhitespaces;
			generateFormattingUndoStep = other.generateFormattingUndoStep;
			DisposeFont ();
			OnChanged (EventArgs.Empty);
		}

Usage Example

		public DisassemblyView ()
		{
			UntitledName = GettextCatalog.GetString ("Disassembly");
			sw = new Gtk.ScrolledWindow ();
			editor = new Mono.TextEditor.TextEditor ();
			editor.Document.ReadOnly = true;
			
			TextEditorOptions options = new TextEditorOptions ();
			options.CopyFrom (TextEditorOptions.DefaultOptions);
			options.ShowEolMarkers = false;
			options.ShowInvalidLines = false;
			options.ShowLineNumberMargin = false;
			editor.Options = options;
			
			sw.Add (editor);
			sw.HscrollbarPolicy = Gtk.PolicyType.Automatic;
			sw.VscrollbarPolicy = Gtk.PolicyType.Automatic;
			sw.ShowAll ();
			sw.Vadjustment.ValueChanged += OnScrollEditor;
			sw.VScrollbar.ButtonPressEvent += OnPress;
			sw.VScrollbar.ButtonReleaseEvent += OnRelease;
			sw.VScrollbar.Events |= Gdk.EventMask.ButtonPressMask | Gdk.EventMask.ButtonReleaseMask;
			sw.ShadowType = Gtk.ShadowType.In;
			
			sw.Sensitive = false;
			
			currentDebugLineMarker = new CurrentDebugLineTextMarker (editor);
			DebuggingService.StoppedEvent += OnStop;
		}