Skip to content

Commit

Permalink
Merge pull request #283 from AvaloniaUI/improve-propertychanged-naming
Browse files Browse the repository at this point in the history
Improve PropertyChanged naming
  • Loading branch information
Gillibald authored Oct 25, 2022
2 parents c1b199b + 3186941 commit 733d3f7
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions src/AvaloniaEdit/TextEditorOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public virtual bool ShowSpaces
if (_showSpaces != value)
{
_showSpaces = value;
OnPropertyChanged("ShowSpaces");
OnPropertyChanged(nameof(ShowSpaces));
}
}
}
Expand All @@ -114,7 +114,7 @@ public virtual string ShowSpacesGlyph
if (_showSpacesGlyph != value)
{
_showSpacesGlyph = value;
OnPropertyChanged("ShowSpacesGlyph");
OnPropertyChanged(nameof(ShowSpacesGlyph));
}
}
}
Expand All @@ -134,7 +134,7 @@ public virtual bool ShowTabs
if (_showTabs != value)
{
_showTabs = value;
OnPropertyChanged("ShowTabs");
OnPropertyChanged(nameof(ShowTabs));
}
}
}
Expand All @@ -154,7 +154,7 @@ public virtual string ShowTabsGlyph
if (_showTabsGlyph != value)
{
_showTabsGlyph = value;
OnPropertyChanged("ShowTabsGlyph");
OnPropertyChanged(nameof(ShowTabsGlyph));
}
}
}
Expand All @@ -174,7 +174,7 @@ public virtual bool ShowEndOfLine
if (_showEndOfLine != value)
{
_showEndOfLine = value;
OnPropertyChanged("ShowEndOfLine");
OnPropertyChanged(nameof(ShowEndOfLine));
}
}
}
Expand All @@ -194,7 +194,7 @@ public virtual string EndOfLineCRLFGlyph
if (_endOfLineCRLFGlyph != value)
{
_endOfLineCRLFGlyph = value;
OnPropertyChanged("CRLFGlyph");
OnPropertyChanged(nameof(EndOfLineCRLFGlyph));
}
}
}
Expand All @@ -214,7 +214,7 @@ public virtual string EndOfLineCRGlyph
if (_endOfLineCRGlyph != value)
{
_endOfLineCRGlyph = value;
OnPropertyChanged("CRGlyph");
OnPropertyChanged(nameof(EndOfLineCRGlyph));
}
}
}
Expand All @@ -234,7 +234,7 @@ public virtual string EndOfLineLFGlyph
if (_endOfLineLFGlyph != value)
{
_endOfLineLFGlyph = value;
OnPropertyChanged("LFGlyph");
OnPropertyChanged(nameof(EndOfLineLFGlyph));
}
}
}
Expand All @@ -254,7 +254,7 @@ public virtual bool ShowBoxForControlCharacters
if (_showBoxForControlCharacters != value)
{
_showBoxForControlCharacters = value;
OnPropertyChanged("ShowBoxForControlCharacters");
OnPropertyChanged(nameof(ShowBoxForControlCharacters));
}
}
}
Expand All @@ -277,7 +277,7 @@ public virtual bool EnableHyperlinks
if (_enableHyperlinks != value)
{
_enableHyperlinks = value;
OnPropertyChanged("EnableHyperlinks");
OnPropertyChanged(nameof(EnableHyperlinks));
}
}
}
Expand All @@ -297,7 +297,7 @@ public virtual bool EnableEmailHyperlinks
if (_enableEmailHyperlinks != value)
{
_enableEmailHyperlinks = value;
OnPropertyChanged("EnableEMailHyperlinks");
OnPropertyChanged(nameof(EnableEmailHyperlinks));
}
}
}
Expand All @@ -318,7 +318,7 @@ public virtual bool RequireControlModifierForHyperlinkClick
if (_requireControlModifierForHyperlinkClick != value)
{
_requireControlModifierForHyperlinkClick = value;
OnPropertyChanged("RequireControlModifierForHyperlinkClick");
OnPropertyChanged(nameof(RequireControlModifierForHyperlinkClick));
}
}
}
Expand Down Expand Up @@ -351,8 +351,8 @@ public virtual int IndentationSize
if (_indentationSize != value)
{
_indentationSize = value;
OnPropertyChanged("IndentationSize");
OnPropertyChanged("IndentationString");
OnPropertyChanged(nameof(IndentationSize));
OnPropertyChanged(nameof(IndentationString));
}
}
}
Expand All @@ -372,8 +372,8 @@ public virtual bool ConvertTabsToSpaces
if (_convertTabsToSpaces != value)
{
_convertTabsToSpaces = value;
OnPropertyChanged("ConvertTabsToSpaces");
OnPropertyChanged("IndentationString");
OnPropertyChanged(nameof(ConvertTabsToSpaces));
OnPropertyChanged(nameof(IndentationString));
}
}
}
Expand Down Expand Up @@ -417,7 +417,7 @@ public virtual bool CutCopyWholeLine
if (_cutCopyWholeLine != value)
{
_cutCopyWholeLine = value;
OnPropertyChanged("CutCopyWholeLine");
OnPropertyChanged(nameof(CutCopyWholeLine));
}
}
}
Expand All @@ -437,7 +437,7 @@ public virtual bool AllowScrollBelowDocument
if (_allowScrollBelowDocument != value)
{
_allowScrollBelowDocument = value;
OnPropertyChanged("AllowScrollBelowDocument");
OnPropertyChanged(nameof(AllowScrollBelowDocument));
}
}
}
Expand All @@ -459,7 +459,7 @@ public virtual double WordWrapIndentation
if (value != _wordWrapIndentation)
{
_wordWrapIndentation = value;
OnPropertyChanged("WordWrapIndentation");
OnPropertyChanged(nameof(WordWrapIndentation));
}
}
}
Expand All @@ -480,7 +480,7 @@ public virtual bool InheritWordWrapIndentation
if (value != _inheritWordWrapIndentation)
{
_inheritWordWrapIndentation = value;
OnPropertyChanged("InheritWordWrapIndentation");
OnPropertyChanged(nameof(InheritWordWrapIndentation));
}
}
}
Expand All @@ -499,7 +499,7 @@ public bool EnableRectangularSelection
if (_enableRectangularSelection != value)
{
_enableRectangularSelection = value;
OnPropertyChanged("EnableRectangularSelection");
OnPropertyChanged(nameof(EnableRectangularSelection));
}
}
}
Expand All @@ -518,7 +518,7 @@ public bool EnableTextDragDrop
if (_enableTextDragDrop != value)
{
_enableTextDragDrop = value;
OnPropertyChanged("EnableTextDragDrop");
OnPropertyChanged(nameof(EnableTextDragDrop));
}
}
}
Expand All @@ -540,7 +540,7 @@ public virtual bool EnableVirtualSpace
if (_enableVirtualSpace != value)
{
_enableVirtualSpace = value;
OnPropertyChanged("EnableVirtualSpace");
OnPropertyChanged(nameof(EnableVirtualSpace));
}
}
}
Expand All @@ -560,7 +560,7 @@ public virtual bool EnableImeSupport
if (_enableImeSupport != value)
{
_enableImeSupport = value;
OnPropertyChanged("EnableImeSupport");
OnPropertyChanged(nameof(EnableImeSupport));
}
}
}
Expand All @@ -579,7 +579,7 @@ public virtual bool ShowColumnRulers
if (_showColumnRulers != value)
{
_showColumnRulers = value;
OnPropertyChanged("ShowColumnRulers");
OnPropertyChanged(nameof(ShowColumnRulers));
}
}
}
Expand All @@ -597,7 +597,7 @@ public virtual IEnumerable<int> ColumnRulerPositions
if (_columnRulerPositions != value)
{
_columnRulerPositions = value;
OnPropertyChanged("ColumnRulerPositions");
OnPropertyChanged(nameof(ColumnRulerPositions));
}
}
}
Expand All @@ -616,7 +616,7 @@ public virtual bool HighlightCurrentLine
if (_highlightCurrentLine != value)
{
_highlightCurrentLine = value;
OnPropertyChanged("HighlightCurrentLine");
OnPropertyChanged(nameof(HighlightCurrentLine));
}
}
}
Expand All @@ -635,7 +635,7 @@ public bool HideCursorWhileTyping
if (_hideCursorWhileTyping != value)
{
_hideCursorWhileTyping = value;
OnPropertyChanged("HideCursorWhileTyping");
OnPropertyChanged(nameof(HideCursorWhileTyping));
}
}
}
Expand All @@ -654,7 +654,7 @@ public bool AllowToggleOverstrikeMode
if (_allowToggleOverstrikeMode != value)
{
_allowToggleOverstrikeMode = value;
OnPropertyChanged("AllowToggleOverstrikeMode");
OnPropertyChanged(nameof(AllowToggleOverstrikeMode));
}
}
}
Expand All @@ -673,7 +673,7 @@ public bool ExtendSelectionOnMouseUp
if (_extendSelectionOnMouseUp != value)
{
_extendSelectionOnMouseUp = value;
OnPropertyChanged("ExtendSelectionOnMouseUp");
OnPropertyChanged(nameof(ExtendSelectionOnMouseUp));
}
}
}
Expand Down

0 comments on commit 733d3f7

Please sign in to comment.