C# Class MarkDownEditor.View.MvvmTextEditor

Class that inherits from the AvalonEdit TextEditor control to enable MVVM interaction.
Inheritance: ICSharpCode.AvalonEdit.TextEditor, INotifyPropertyChanged
Afficher le fichier Open project: chenguanzhou/MarkDownEditor

Méthodes publiques

Свойство Type Description
CanRedoProperty System.Windows.DependencyProperty
CanUndoProperty System.Windows.DependencyProperty
CaretOffsetProperty System.Windows.DependencyProperty
HighlightCurrentLineProperty System.Windows.DependencyProperty
RulerPositionProperty System.Windows.DependencyProperty
ScrollOffsetRatioProperty System.Windows.DependencyProperty
ScrollToSelectionStartProperty System.Windows.DependencyProperty
SelectionLengthProperty System.Windows.DependencyProperty
SelectionStartProperty System.Windows.DependencyProperty
ShowColumnRulerProperty System.Windows.DependencyProperty
ShowEndOfLineProperty System.Windows.DependencyProperty
ShowSpacesProperty System.Windows.DependencyProperty
ShowTabsProperty System.Windows.DependencyProperty

Méthodes publiques

Méthode Description
MvvmTextEditor ( ) : ICSharpCode.AvalonEdit

Default constructor to set up event handlers.

RaisePropertyChanged ( string info ) : void
TextArea_SelectionChanged ( object sender, EventArgs e ) : void

Event handler to update properties based upon the selection changed event.

Méthodes protégées

Méthode Description
OnScrollChanged ( object sender, RoutedEventArgs e ) : void
OnTextChanged ( EventArgs e ) : void

Override of OnTextChanged event.

Private Methods

Méthode Description
Caret_PositionChanged ( object sender, EventArgs e ) : void
HighlightCurrentLineChanged ( DependencyObject source, System.Windows.DependencyPropertyChangedEventArgs ea ) : void
RulerPositionChanged ( DependencyObject source, System.Windows.DependencyPropertyChangedEventArgs ea ) : void
ShowColumnRulerChanged ( DependencyObject source, System.Windows.DependencyPropertyChangedEventArgs ea ) : void
ShowEndOfLineChanged ( DependencyObject source, System.Windows.DependencyPropertyChangedEventArgs ea ) : void
ShowSpacesChanged ( DependencyObject source, System.Windows.DependencyPropertyChangedEventArgs ea ) : void
ShowTabsChanged ( DependencyObject source, System.Windows.DependencyPropertyChangedEventArgs ea ) : void

Method Details

MvvmTextEditor() public méthode

Default constructor to set up event handlers.
public MvvmTextEditor ( ) : ICSharpCode.AvalonEdit
Résultat ICSharpCode.AvalonEdit

OnScrollChanged() protected méthode

protected OnScrollChanged ( object sender, RoutedEventArgs e ) : void
sender object
e System.Windows.RoutedEventArgs
Résultat void

OnTextChanged() protected méthode

Override of OnTextChanged event.
protected OnTextChanged ( EventArgs e ) : void
e System.EventArgs
Résultat void

RaisePropertyChanged() public méthode

public RaisePropertyChanged ( string info ) : void
info string
Résultat void

TextArea_SelectionChanged() public méthode

Event handler to update properties based upon the selection changed event.
public TextArea_SelectionChanged ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Résultat void

Property Details

CanRedoProperty public_oe static_oe property

DependencyProperty for the TextEditor CanUndo property.
public static DependencyProperty,System.Windows CanRedoProperty
Résultat System.Windows.DependencyProperty

CanUndoProperty public_oe static_oe property

DependencyProperty for the TextEditor CanUndo property.
public static DependencyProperty,System.Windows CanUndoProperty
Résultat System.Windows.DependencyProperty

CaretOffsetProperty public_oe static_oe property

DependencyProperty for the CaretOffset binding.
public static DependencyProperty,System.Windows CaretOffsetProperty
Résultat System.Windows.DependencyProperty

HighlightCurrentLineProperty public_oe static_oe property

public static DependencyProperty,System.Windows HighlightCurrentLineProperty
Résultat System.Windows.DependencyProperty

RulerPositionProperty public_oe static_oe property

public static DependencyProperty,System.Windows RulerPositionProperty
Résultat System.Windows.DependencyProperty

ScrollOffsetRatioProperty public_oe static_oe property

DependencyProperty for the ScrollOffsetRatio binding.
public static DependencyProperty,System.Windows ScrollOffsetRatioProperty
Résultat System.Windows.DependencyProperty

ScrollToSelectionStartProperty public_oe static_oe property

DependencyProperty for the ShouldReload binding.
public static DependencyProperty,System.Windows ScrollToSelectionStartProperty
Résultat System.Windows.DependencyProperty

SelectionLengthProperty public_oe static_oe property

DependencyProperty for the TextEditor SelectionLength property.
public static DependencyProperty,System.Windows SelectionLengthProperty
Résultat System.Windows.DependencyProperty

SelectionStartProperty public_oe static_oe property

DependencyProperty for the TextEditor SelectionStart property.
public static DependencyProperty,System.Windows SelectionStartProperty
Résultat System.Windows.DependencyProperty

ShowColumnRulerProperty public_oe static_oe property

public static DependencyProperty,System.Windows ShowColumnRulerProperty
Résultat System.Windows.DependencyProperty

ShowEndOfLineProperty public_oe static_oe property

public static DependencyProperty,System.Windows ShowEndOfLineProperty
Résultat System.Windows.DependencyProperty

ShowSpacesProperty public_oe static_oe property

public static DependencyProperty,System.Windows ShowSpacesProperty
Résultat System.Windows.DependencyProperty

ShowTabsProperty public_oe static_oe property

public static DependencyProperty,System.Windows ShowTabsProperty
Résultat System.Windows.DependencyProperty