Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit f82d042

Browse files
committed
translate search window textbox watermarks
1 parent 3afbc92 commit f82d042

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

UI/Windows/SearchWindow.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
</ResourceDictionary>
3232
</controls:MetroWindow.Resources>
3333

34-
<Grid Name="FindReplaceGrid">
34+
<Grid Name="SearchGrid">
3535
<Grid.RowDefinitions>
3636
<RowDefinition Height="130"/>
3737
<RowDefinition/>
@@ -40,8 +40,8 @@
4040

4141
<Grid Grid.Row="0" VerticalAlignment="Center">
4242
<StackPanel>
43-
<TextBox x:Name="FindBox" Margin="10,0,10,5" Height="55" controls:TextBoxHelper.Watermark="Find" VerticalScrollBarVisibility="Visible" TextChanged="SearchBoxTextChanged" KeyDown="SearchBoxKeyUp" />
44-
<TextBox x:Name="ReplaceBox" Margin="10,0,10,5" Height="55" controls:TextBoxHelper.Watermark="Replace" VerticalScrollBarVisibility="Visible" KeyDown="ReplaceBoxKeyUp" TextChanged="ReplaceBoxTextChanged" />
43+
<TextBox x:Name="FindBox" Margin="10,0,10,5" Height="55" VerticalScrollBarVisibility="Visible" TextChanged="SearchBoxTextChanged" KeyDown="SearchBoxKeyUp" />
44+
<TextBox x:Name="ReplaceBox" Margin="10,0,10,5" Height="55" VerticalScrollBarVisibility="Visible" KeyDown="ReplaceBoxKeyUp" TextChanged="ReplaceBoxTextChanged" />
4545
</StackPanel>
4646
</Grid>
4747

UI/Windows/SearchWindow.xaml.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using System.Windows.Controls;
99
using System.Windows.Input;
1010
using MahApps.Metro;
11+
using MahApps.Metro.Controls;
1112
using SPCode.UI.Components;
1213
using Xceed.Wpf.AvalonDock.Layout;
1314
using static SPCode.Interop.TranslationProvider;
@@ -206,7 +207,7 @@ private void ToggleSearchField()
206207
}
207208
}
208209
IsSearchFieldOpen = false;
209-
FindReplaceGrid.IsHitTestVisible = false;
210+
SearchGrid.IsHitTestVisible = false;
210211
if (_editor == null)
211212
{
212213
return;
@@ -216,7 +217,7 @@ private void ToggleSearchField()
216217
else
217218
{
218219
IsSearchFieldOpen = true;
219-
FindReplaceGrid.IsHitTestVisible = true;
220+
SearchGrid.IsHitTestVisible = true;
220221
if (_editor == null)
221222
{
222223
return;
@@ -546,6 +547,9 @@ public void Language_Translate()
546547
Count_Button.Content = Translate("Count");
547548
CCBoxText.Text = Translate("CaseSen");
548549
MLRBoxText.Text = Translate("MultilineRegex");
550+
551+
TextBoxHelper.SetWatermark(FindBox, Translate("Find"));
552+
TextBoxHelper.SetWatermark(ReplaceBox, Translate("Replace"));
549553
}
550554

551555
private void EvaluateRTL()

0 commit comments

Comments
 (0)