C# 클래스 ICSharpCode.AvalonEdit.Editing.TextArea

Control that wraps a TextView and adds support for user input and the caret.
상속: System.Windows.Controls.Control, IScrollInfo, IWeakEventListener, ITextEditorComponent, IServiceProvider
파일 보기 프로젝트 열기: gilgame/SEWorkbench 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
DocumentProperty System.Windows.DependencyProperty
IndentationStrategyProperty System.Windows.DependencyProperty
OptionsProperty System.Windows.DependencyProperty
SelectionBorderProperty System.Windows.DependencyProperty
SelectionBrushProperty System.Windows.DependencyProperty
SelectionCornerRadiusProperty System.Windows.DependencyProperty
SelectionForegroundProperty System.Windows.DependencyProperty

Private Properties

프로퍼티 타입 설명
ApplyScrollInfo void
EnsureSelectionValid void
GetDeletableSegments ISegment[]
IScrollInfo System.Windows.Rect
IScrollInfo void
IScrollInfo void
IWeakEventListener bool
OnDocumentChanged void
OnDocumentChanged void
OnDocumentChanged void
OnDocumentChanging void
OnOptionsChanged void
OnOptionsChanged void
OnTextCopied void
OnUpdateFinished void
OnUpdateStarted void
RemoveSelectedText void
ReplaceSelectionWithNewLine void
ReplaceSelectionWithText void
RequestSelectionValidation void
TextArea System
leftMargins_CollectionChanged void

공개 메소드들

메소드 설명
AllowCaretOutsideSelection ( ) : IDisposable

Temporarily allows positioning the caret outside the selection. Dispose the returned IDisposable to revert the allowance.

The text area only forces the caret to be inside the selection when other events have finished running (using the dispatcher), so you don't have to use this method for temporarily positioning the caret in event handlers. This method is only necessary if you want to run the WPF dispatcher, e.g. if you perform a drag'n'drop operation.

ClearSelection ( ) : void

Clears the current selection.

GetService ( Type serviceType ) : object

Gets the requested service.

OnApplyTemplate ( ) : void
PerformTextInput ( System.Windows.Input.TextCompositionEventArgs e ) : void

Performs text input. This raises the TextEntering event, replaces the selection with the text, and then raises the TextEntered event.

PerformTextInput ( string text ) : void

Performs text input. This raises the TextEntering event, replaces the selection with the text, and then raises the TextEntered event.

PopStackedInputHandler ( ICSharpCode.AvalonEdit.Editing.TextAreaStackedInputHandler inputHandler ) : void

Pops the stacked input handler (and all input handlers above it). If inputHandler is not found in the currently stacked input handlers, or is null, this method does nothing.

PushStackedInputHandler ( ICSharpCode.AvalonEdit.Editing.TextAreaStackedInputHandler inputHandler ) : void

Pushes an input handler onto the list of stacked input handlers.

보호된 메소드들

메소드 설명
HitTestCore ( System.Windows.Media.PointHitTestParameters hitTestParameters ) : System.Windows.Media.HitTestResult
OnGotKeyboardFocus ( System.Windows.Input.KeyboardFocusChangedEventArgs e ) : void
OnKeyDown ( System.Windows.Input.KeyEventArgs e ) : void
OnKeyUp ( System.Windows.Input.KeyEventArgs e ) : void
OnLostKeyboardFocus ( System.Windows.Input.KeyboardFocusChangedEventArgs e ) : void
OnMouseDown ( System.Windows.Input.MouseButtonEventArgs e ) : void
OnOptionChanged ( PropertyChangedEventArgs e ) : void

Raises the OptionChanged event.

OnPreviewKeyDown ( System.Windows.Input.KeyEventArgs e ) : void
OnPreviewKeyUp ( System.Windows.Input.KeyEventArgs e ) : void
OnPropertyChanged ( System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnTextEntered ( System.Windows.Input.TextCompositionEventArgs e ) : void

Raises the TextEntered event.

OnTextEntering ( System.Windows.Input.TextCompositionEventArgs e ) : void

Raises the TextEntering event.

OnTextInput ( System.Windows.Input.TextCompositionEventArgs e ) : void
ReceiveWeakEvent ( Type managerType, object sender, EventArgs e ) : bool
TextArea ( TextView textView ) : System

Creates a new TextArea instance.

비공개 메소드들

메소드 설명
ApplyScrollInfo ( ) : void
EnsureSelectionValid ( ) : void

Code that updates only the caret but not the selection can cause confusion when keys like 'Delete' delete the (possibly invisible) selected text and not the text around the caret. So we'll ensure that the caret is inside the selection. (when the caret is not in the selection, we'll clear the selection) This method is invoked using the Dispatcher so that code may temporarily violate this rule (e.g. most 'extend selection' methods work by first setting the caret, then the selection), it's sufficient to fix it after any event handlers have run.

GetDeletableSegments ( ISegment segment ) : ISegment[]
IScrollInfo ( System visual, Rect rectangle ) : Rect
IScrollInfo ( ) : void
IScrollInfo ( double offset ) : void
IWeakEventListener ( Type managerType, object sender, EventArgs e ) : bool
OnDocumentChanged ( DependencyObject dp, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnDocumentChanged ( ICSharpCode.AvalonEdit.Document.DocumentChangeEventArgs e ) : void
OnDocumentChanged ( TextDocument oldValue, TextDocument newValue ) : void
OnDocumentChanging ( ) : void
OnOptionsChanged ( DependencyObject dp, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnOptionsChanged ( TextEditorOptions oldValue, TextEditorOptions newValue ) : void
OnTextCopied ( TextEventArgs e ) : void
OnUpdateFinished ( ) : void
OnUpdateStarted ( ) : void
RemoveSelectedText ( ) : void
ReplaceSelectionWithNewLine ( ) : void
ReplaceSelectionWithText ( string newText ) : void
RequestSelectionValidation ( ) : void
TextArea ( ) : System
leftMargins_CollectionChanged ( object sender, NotifyCollectionChangedEventArgs e ) : void

메소드 상세

AllowCaretOutsideSelection() 공개 메소드

Temporarily allows positioning the caret outside the selection. Dispose the returned IDisposable to revert the allowance.
The text area only forces the caret to be inside the selection when other events have finished running (using the dispatcher), so you don't have to use this method for temporarily positioning the caret in event handlers. This method is only necessary if you want to run the WPF dispatcher, e.g. if you perform a drag'n'drop operation.
public AllowCaretOutsideSelection ( ) : IDisposable
리턴 IDisposable

ClearSelection() 공개 메소드

Clears the current selection.
public ClearSelection ( ) : void
리턴 void

GetService() 공개 메소드

Gets the requested service.
public GetService ( Type serviceType ) : object
serviceType System.Type
리턴 object

HitTestCore() 보호된 메소드

protected HitTestCore ( System.Windows.Media.PointHitTestParameters hitTestParameters ) : System.Windows.Media.HitTestResult
hitTestParameters System.Windows.Media.PointHitTestParameters
리턴 System.Windows.Media.HitTestResult

OnApplyTemplate() 공개 메소드

public OnApplyTemplate ( ) : void
리턴 void

OnGotKeyboardFocus() 보호된 메소드

protected OnGotKeyboardFocus ( System.Windows.Input.KeyboardFocusChangedEventArgs e ) : void
e System.Windows.Input.KeyboardFocusChangedEventArgs
리턴 void

OnKeyDown() 보호된 메소드

protected OnKeyDown ( System.Windows.Input.KeyEventArgs e ) : void
e System.Windows.Input.KeyEventArgs
리턴 void

OnKeyUp() 보호된 메소드

protected OnKeyUp ( System.Windows.Input.KeyEventArgs e ) : void
e System.Windows.Input.KeyEventArgs
리턴 void

OnLostKeyboardFocus() 보호된 메소드

protected OnLostKeyboardFocus ( System.Windows.Input.KeyboardFocusChangedEventArgs e ) : void
e System.Windows.Input.KeyboardFocusChangedEventArgs
리턴 void

OnMouseDown() 보호된 메소드

protected OnMouseDown ( System.Windows.Input.MouseButtonEventArgs e ) : void
e System.Windows.Input.MouseButtonEventArgs
리턴 void

OnOptionChanged() 보호된 메소드

Raises the OptionChanged event.
protected OnOptionChanged ( PropertyChangedEventArgs e ) : void
e System.ComponentModel.PropertyChangedEventArgs
리턴 void

OnPreviewKeyDown() 보호된 메소드

protected OnPreviewKeyDown ( System.Windows.Input.KeyEventArgs e ) : void
e System.Windows.Input.KeyEventArgs
리턴 void

OnPreviewKeyUp() 보호된 메소드

protected OnPreviewKeyUp ( System.Windows.Input.KeyEventArgs e ) : void
e System.Windows.Input.KeyEventArgs
리턴 void

OnPropertyChanged() 보호된 메소드

protected OnPropertyChanged ( System.Windows.DependencyPropertyChangedEventArgs e ) : void
e System.Windows.DependencyPropertyChangedEventArgs
리턴 void

OnTextEntered() 보호된 메소드

Raises the TextEntered event.
protected OnTextEntered ( System.Windows.Input.TextCompositionEventArgs e ) : void
e System.Windows.Input.TextCompositionEventArgs
리턴 void

OnTextEntering() 보호된 메소드

Raises the TextEntering event.
protected OnTextEntering ( System.Windows.Input.TextCompositionEventArgs e ) : void
e System.Windows.Input.TextCompositionEventArgs
리턴 void

OnTextInput() 보호된 메소드

protected OnTextInput ( System.Windows.Input.TextCompositionEventArgs e ) : void
e System.Windows.Input.TextCompositionEventArgs
리턴 void

PerformTextInput() 공개 메소드

Performs text input. This raises the TextEntering event, replaces the selection with the text, and then raises the TextEntered event.
public PerformTextInput ( System.Windows.Input.TextCompositionEventArgs e ) : void
e System.Windows.Input.TextCompositionEventArgs
리턴 void

PerformTextInput() 공개 메소드

Performs text input. This raises the TextEntering event, replaces the selection with the text, and then raises the TextEntered event.
public PerformTextInput ( string text ) : void
text string
리턴 void

PopStackedInputHandler() 공개 메소드

Pops the stacked input handler (and all input handlers above it). If inputHandler is not found in the currently stacked input handlers, or is null, this method does nothing.
public PopStackedInputHandler ( ICSharpCode.AvalonEdit.Editing.TextAreaStackedInputHandler inputHandler ) : void
inputHandler ICSharpCode.AvalonEdit.Editing.TextAreaStackedInputHandler
리턴 void

PushStackedInputHandler() 공개 메소드

Pushes an input handler onto the list of stacked input handlers.
public PushStackedInputHandler ( ICSharpCode.AvalonEdit.Editing.TextAreaStackedInputHandler inputHandler ) : void
inputHandler ICSharpCode.AvalonEdit.Editing.TextAreaStackedInputHandler
리턴 void

ReceiveWeakEvent() 보호된 메소드

protected ReceiveWeakEvent ( Type managerType, object sender, EventArgs e ) : bool
managerType System.Type
sender object
e System.EventArgs
리턴 bool

TextArea() 보호된 메소드

Creates a new TextArea instance.
protected TextArea ( TextView textView ) : System
textView TextView
리턴 System

프로퍼티 상세

DocumentProperty 공개적으로 정적으로 프로퍼티

Document property.
public static DependencyProperty,System.Windows DocumentProperty
리턴 System.Windows.DependencyProperty

IndentationStrategyProperty 공개적으로 정적으로 프로퍼티

IndentationStrategy property.
public static DependencyProperty,System.Windows IndentationStrategyProperty
리턴 System.Windows.DependencyProperty

OptionsProperty 공개적으로 정적으로 프로퍼티

Options property.
public static DependencyProperty,System.Windows OptionsProperty
리턴 System.Windows.DependencyProperty

SelectionBorderProperty 공개적으로 정적으로 프로퍼티

The SelectionBorder property.
public static DependencyProperty,System.Windows SelectionBorderProperty
리턴 System.Windows.DependencyProperty

SelectionBrushProperty 공개적으로 정적으로 프로퍼티

The SelectionBrush property.
public static DependencyProperty,System.Windows SelectionBrushProperty
리턴 System.Windows.DependencyProperty

SelectionCornerRadiusProperty 공개적으로 정적으로 프로퍼티

The SelectionCornerRadius property.
public static DependencyProperty,System.Windows SelectionCornerRadiusProperty
리턴 System.Windows.DependencyProperty

SelectionForegroundProperty 공개적으로 정적으로 프로퍼티

The SelectionForeground property.
public static DependencyProperty,System.Windows SelectionForegroundProperty
리턴 System.Windows.DependencyProperty