Skip to content

Commit 31db770

Browse files
committed
Consolidated code
1 parent 869dd4f commit 31db770

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Microsoft.Toolkit.Uwp.SampleApp/Controls/XamlCodeEditor.xaml.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,11 @@ public string Text
123123

124124
public DateTime TimeSampleEditedLast { get; private set; } = DateTime.MinValue;
125125

126-
private CssLineStyle _errorStyle_Light = new CssLineStyle() { BackgroundColor = new SolidColorBrush(Color.FromArgb(0x00, 0xFF, 0xD6, 0xD6)) };
127-
private CssLineStyle _errorStyle_Dark = new CssLineStyle() { BackgroundColor = new SolidColorBrush(Color.FromArgb(0x00, 0x6E, 0x00, 0x00)) };
128-
129126
private CssLineStyle ErrorStyle
130127
{
131-
get => _themeListener.CurrentTheme.Equals(ApplicationTheme.Light) ? _errorStyle_Light : _errorStyle_Dark;
128+
get => _themeListener.CurrentTheme.Equals(ApplicationTheme.Light) ?
129+
new CssLineStyle() { BackgroundColor = new SolidColorBrush(Color.FromArgb(0x00, 0xFF, 0xD6, 0xD6)) } :
130+
new CssLineStyle() { BackgroundColor = new SolidColorBrush(Color.FromArgb(0x00, 0x6E, 0x00, 0x00)) };
132131
}
133132

134133
private CssGlyphStyle _errorIconStyle = new CssGlyphStyle()

0 commit comments

Comments
 (0)