C# Class MarkDownEditor.View.MvvmTextEditor

Class that inherits from the AvalonEdit TextEditor control to enable MVVM interaction.
Inheritance: ICSharpCode.AvalonEdit.TextEditor, INotifyPropertyChanged
ファイルを表示 Open project: chenguanzhou/MarkDownEditor

Public Properties

Property 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

Public Methods

Method 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.

Protected Methods

Method Description
OnScrollChanged ( object sender, RoutedEventArgs e ) : void
OnTextChanged ( EventArgs e ) : void

Override of OnTextChanged event.

Private Methods

Method 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 method

Default constructor to set up event handlers.
public MvvmTextEditor ( ) : ICSharpCode.AvalonEdit
return ICSharpCode.AvalonEdit

OnScrollChanged() protected method

protected OnScrollChanged ( object sender, RoutedEventArgs e ) : void
sender object
e System.Windows.RoutedEventArgs
return void

OnTextChanged() protected method

Override of OnTextChanged event.
protected OnTextChanged ( EventArgs e ) : void
e System.EventArgs
return void

RaisePropertyChanged() public method

public RaisePropertyChanged ( string info ) : void
info string
return void

TextArea_SelectionChanged() public method

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

Property Details

CanRedoProperty public_oe static_oe property

DependencyProperty for the TextEditor CanUndo property.
public static DependencyProperty,System.Windows CanRedoProperty
return System.Windows.DependencyProperty

CanUndoProperty public_oe static_oe property

DependencyProperty for the TextEditor CanUndo property.
public static DependencyProperty,System.Windows CanUndoProperty
return System.Windows.DependencyProperty

CaretOffsetProperty public_oe static_oe property

DependencyProperty for the CaretOffset binding.
public static DependencyProperty,System.Windows CaretOffsetProperty
return System.Windows.DependencyProperty

HighlightCurrentLineProperty public_oe static_oe property

public static DependencyProperty,System.Windows HighlightCurrentLineProperty
return System.Windows.DependencyProperty

RulerPositionProperty public_oe static_oe property

public static DependencyProperty,System.Windows RulerPositionProperty
return System.Windows.DependencyProperty

ScrollOffsetRatioProperty public_oe static_oe property

DependencyProperty for the ScrollOffsetRatio binding.
public static DependencyProperty,System.Windows ScrollOffsetRatioProperty
return System.Windows.DependencyProperty

ScrollToSelectionStartProperty public_oe static_oe property

DependencyProperty for the ShouldReload binding.
public static DependencyProperty,System.Windows ScrollToSelectionStartProperty
return System.Windows.DependencyProperty

SelectionLengthProperty public_oe static_oe property

DependencyProperty for the TextEditor SelectionLength property.
public static DependencyProperty,System.Windows SelectionLengthProperty
return System.Windows.DependencyProperty

SelectionStartProperty public_oe static_oe property

DependencyProperty for the TextEditor SelectionStart property.
public static DependencyProperty,System.Windows SelectionStartProperty
return System.Windows.DependencyProperty

ShowColumnRulerProperty public_oe static_oe property

public static DependencyProperty,System.Windows ShowColumnRulerProperty
return System.Windows.DependencyProperty

ShowEndOfLineProperty public_oe static_oe property

public static DependencyProperty,System.Windows ShowEndOfLineProperty
return System.Windows.DependencyProperty

ShowSpacesProperty public_oe static_oe property

public static DependencyProperty,System.Windows ShowSpacesProperty
return System.Windows.DependencyProperty

ShowTabsProperty public_oe static_oe property

public static DependencyProperty,System.Windows ShowTabsProperty
return System.Windows.DependencyProperty