Skip to content

Commit 578210a

Browse files
committed
Merge branch 'Keboo-spellCheck'
2 parents 24b5250 + f257410 commit 578210a

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

MaterialDesignThemes.Wpf/Spelling.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ namespace MaterialDesignThemes.Wpf
44
{
55
public static class Spelling
66
{
7-
public static ResourceKey SpellingSuggestionMenuItemStyleKey { get; } = new ComponentResourceKey(typeof(Spelling), ResourceKeyId.SpellingSuggestionMenuItemStyle);
8-
public static ResourceKey SpellingIgnoreAllMenuItemStyleKey { get; } = new ComponentResourceKey(typeof(Spelling), ResourceKeyId.SpellingIgnoreAllMenuItemStyle);
9-
public static ResourceKey SpellingNoSuggestionsMenuItemStyleKey { get; } = new ComponentResourceKey(typeof(Spelling), ResourceKeyId.SpellingNoSuggestionsMenuItemStyle);
10-
public static ResourceKey SpellingSeparatorStyleKey { get; } = new ComponentResourceKey(typeof(Spelling), ResourceKeyId.SpellingSeparatorStyle);
7+
public static ResourceKey SuggestionMenuItemStyleKey { get; } = new ComponentResourceKey(typeof(Spelling), ResourceKeyId.SpellingSuggestionMenuItemStyle);
8+
public static ResourceKey IgnoreAllMenuItemStyleKey { get; } = new ComponentResourceKey(typeof(Spelling), ResourceKeyId.SpellingIgnoreAllMenuItemStyle);
9+
public static ResourceKey NoSuggestionsMenuItemStyleKey { get; } = new ComponentResourceKey(typeof(Spelling), ResourceKeyId.SpellingNoSuggestionsMenuItemStyle);
10+
public static ResourceKey SeparatorStyleKey { get; } = new ComponentResourceKey(typeof(Spelling), ResourceKeyId.SpellingSeparatorStyle);
1111
}
1212

1313
internal enum ResourceKeyId

MaterialDesignThemes.Wpf/TextFieldAssist.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ private static void TextBoxOnContextMenuOpening(object sender, ContextMenuEventA
116116
if (spellingError != null)
117117
{
118118
Style spellingSuggestionStyle =
119-
contextMenu.TryFindResource(Spelling.SpellingSuggestionMenuItemStyleKey) as Style;
119+
contextMenu.TryFindResource(Spelling.SuggestionMenuItemStyleKey) as Style;
120120

121121
int insertionIndex = 0;
122122
bool hasSuggestion = false;
@@ -137,28 +137,28 @@ private static void TextBoxOnContextMenuOpening(object sender, ContextMenuEventA
137137
{
138138
contextMenu.Items.Insert(insertionIndex++, new MenuItem
139139
{
140-
Style = contextMenu.TryFindResource(Spelling.SpellingNoSuggestionsMenuItemStyleKey) as Style,
140+
Style = contextMenu.TryFindResource(Spelling.NoSuggestionsMenuItemStyleKey) as Style,
141141
Tag = typeof(Spelling)
142142
});
143143
}
144144

145145
contextMenu.Items.Insert(insertionIndex++, new Separator
146146
{
147-
Style = contextMenu.TryFindResource(Spelling.SpellingSeparatorStyleKey) as Style,
147+
Style = contextMenu.TryFindResource(Spelling.SeparatorStyleKey) as Style,
148148
Tag = typeof(Spelling)
149149
});
150150

151151
contextMenu.Items.Insert(insertionIndex++, new MenuItem
152152
{
153153
Command = EditingCommands.IgnoreSpellingError,
154154
CommandTarget = textBoxBase,
155-
Style = contextMenu.TryFindResource(Spelling.SpellingIgnoreAllMenuItemStyleKey) as Style,
155+
Style = contextMenu.TryFindResource(Spelling.IgnoreAllMenuItemStyleKey) as Style,
156156
Tag = typeof(Spelling)
157157
});
158158

159159
contextMenu.Items.Insert(insertionIndex, new Separator
160160
{
161-
Style = contextMenu.TryFindResource(Spelling.SpellingSeparatorStyleKey) as Style,
161+
Style = contextMenu.TryFindResource(Spelling.SeparatorStyleKey) as Style,
162162
Tag = typeof(Spelling)
163163
});
164164
}

MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.Menu.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,16 +275,16 @@
275275
</Setter>
276276
</Style>
277277

278-
<Style x:Key="{x:Static wpf:Spelling.SpellingSuggestionMenuItemStyleKey}" TargetType="{x:Type MenuItem}" BasedOn="{StaticResource MaterialDesignMenuItem}">
278+
<Style x:Key="{x:Static wpf:Spelling.SuggestionMenuItemStyleKey}" TargetType="{x:Type MenuItem}" BasedOn="{StaticResource MaterialDesignMenuItem}">
279279
<Setter Property="FontWeight" Value="Bold" />
280280
<Setter Property="Header" Value="{Binding RelativeSource={RelativeSource Self}, Path=CommandParameter}" />
281281
</Style>
282282

283-
<Style x:Key="{x:Static wpf:Spelling.SpellingIgnoreAllMenuItemStyleKey}" TargetType="{x:Type MenuItem}" BasedOn="{StaticResource MaterialDesignMenuItem}">
283+
<Style x:Key="{x:Static wpf:Spelling.IgnoreAllMenuItemStyleKey}" TargetType="{x:Type MenuItem}" BasedOn="{StaticResource MaterialDesignMenuItem}">
284284
<Setter Property="Header" Value="Ignore All" />
285285
</Style>
286286

287-
<Style x:Key="{x:Static wpf:Spelling.SpellingNoSuggestionsMenuItemStyleKey}" TargetType="{x:Type MenuItem}" BasedOn="{StaticResource MaterialDesignMenuItem}">
287+
<Style x:Key="{x:Static wpf:Spelling.NoSuggestionsMenuItemStyleKey}" TargetType="{x:Type MenuItem}" BasedOn="{StaticResource MaterialDesignMenuItem}">
288288
<Setter Property="Header" Value="(no spelling suggestions)" />
289289
<Setter Property="IsEnabled" Value="False" />
290290
</Style>

0 commit comments

Comments
 (0)