Skip to content

Commit 728feda

Browse files
committed
Use binding for MainWindow and MainPage
1 parent cacbde9 commit 728feda

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

CollapseLauncher/XAMLs/MainApp/MainPage.xaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
PaneClosing="NavigationPanelClosing_Event"
9393
PaneDisplayMode="LeftCompact"
9494
PaneOpening="NavigationPanelOpening_Event"
95-
PaneTitle="{x:Bind helper:Locale.Current.Lang._MainPage.NavigationMenu}"
95+
PaneTitle="{x:Bind helper:Locale.Current.Lang._MainPage.NavigationMenu, Mode=OneWay}"
9696
Visibility="Visible">
9797
<Grid Background="Transparent">
9898
<Frame x:Name="LauncherFrame">
@@ -163,7 +163,7 @@
163163
CornerRadius="15,0,0,15"
164164
DropDownClosed="GameComboBox_OnDropDownClosed"
165165
DropDownOpened="GameComboBox_OnDropDownOpened"
166-
PlaceholderText="{x:Bind helper:Locale.Current.Lang._GameClientTitles['Honkai Impact 3rd']}"
166+
PlaceholderText="{x:Bind helper:Locale.Current.Lang._GameClientTitles['Honkai Impact 3rd'], Mode=OneWay}"
167167
SelectionChanged="SetGameCategoryChange" />
168168
<ComboBox x:Name="ComboBoxGameRegion"
169169
BorderThickness="0"
@@ -173,7 +173,7 @@
173173
CornerRadius="0,15,15,0"
174174
DropDownClosed="GameComboBox_OnDropDownClosed"
175175
DropDownOpened="GameComboBox_OnDropDownOpened"
176-
PlaceholderText="{x:Bind helper:Locale.Current.Lang._GameClientRegions['Southeast Asia']}"
176+
PlaceholderText="{x:Bind helper:Locale.Current.Lang._GameClientRegions['Southeast Asia'], Mode=OneWay}"
177177
SelectionChanged="EnableRegionChangeButton" />
178178
</Grid>
179179
<Grid x:Name="ChangeGameBtnGridShadow"
@@ -203,7 +203,7 @@
203203
HorizontalAlignment="Center"
204204
VerticalAlignment="Center"
205205
FontWeight="SemiBold"
206-
Text="{x:Bind helper:Locale.Current.Lang._Misc.Change}" />
206+
Text="{x:Bind helper:Locale.Current.Lang._Misc.Change, Mode=OneWay}" />
207207
<Grid Grid.Column="1"
208208
Margin="4,0,0,0"
209209
HorizontalAlignment="Center"
@@ -240,7 +240,7 @@
240240
HorizontalAlignment="Center"
241241
VerticalAlignment="Center"
242242
FontWeight="SemiBold"
243-
Text="{x:Bind helper:Locale.Current.Lang._Misc.Change}" />
243+
Text="{x:Bind helper:Locale.Current.Lang._Misc.Change, Mode=OneWay}" />
244244
<Grid Grid.Column="1"
245245
Margin="4,0,0,0"
246246
HorizontalAlignment="Center"
@@ -268,15 +268,15 @@
268268
<TextBlock Width="200"
269269
Margin="0,0,0,12"
270270
FontWeight="SemiBold"
271-
Text="{x:Bind helper:Locale.Current.Lang._MainPage.RegionChangeConfirm}"
271+
Text="{x:Bind helper:Locale.Current.Lang._MainPage.RegionChangeConfirm, Mode=OneWay}"
272272
TextWrapping="Wrap" />
273273
<StackPanel x:Name="ChangeRegionWarning"
274274
Visibility="Collapsed">
275275
<TextBlock Width="200"
276276
FontSize="14"
277277
FontWeight="SemiBold"
278278
Style="{ThemeResource BaseTextBlockStyle}"
279-
Text="{x:Bind helper:Locale.Current.Lang._MainPage.RegionChangeWarnTitle}" />
279+
Text="{x:Bind helper:Locale.Current.Lang._MainPage.RegionChangeWarnTitle, Mode=OneWay}" />
280280
<TextBlock x:Name="ChangeRegionWarningText"
281281
Width="200"
282282
Margin="0,0,0,12"
@@ -327,7 +327,7 @@
327327
HorizontalAlignment="Left"
328328
VerticalAlignment="Center"
329329
FontWeight="SemiBold"
330-
Text="{x:Bind helper:Locale.Current.Lang._MainPage.RegionChangeConfirmBtn}" />
330+
Text="{x:Bind helper:Locale.Current.Lang._MainPage.RegionChangeConfirmBtn, Mode=OneWay}" />
331331
</Grid>
332332
</Grid>
333333
</Button.Content>
@@ -505,7 +505,7 @@
505505
FontSize="20"
506506
FontWeight="SemiBold"
507507
Opacity="0.50"
508-
Text="{x:Bind helper:Locale.Current.Lang._MainPage.NotifNoNewNotifs}"
508+
Text="{x:Bind helper:Locale.Current.Lang._MainPage.NotifNoNewNotifs, Mode=OneWay}"
509509
TextAlignment="Center" />
510510
</Grid>
511511
</StackPanel>
@@ -541,7 +541,7 @@
541541
Orientation="Horizontal">
542542
<TextBlock Margin="0,-1,8,1"
543543
FontWeight="Medium"
544-
Text="{x:Bind helper:Locale.Current.Lang._MainPage.NotifClearAll}" />
544+
Text="{x:Bind helper:Locale.Current.Lang._MainPage.NotifClearAll, Mode=OneWay}" />
545545
<FontIcon FontFamily="{ThemeResource FontAwesomeSolid}"
546546
FontSize="16"
547547
Glyph="&#xf2ed;" />

CollapseLauncher/XAMLs/MainApp/MainWindow.xaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
xmlns:helper="using:CollapseLauncher.Helper"
77
xmlns:local="using:CollapseLauncher"
88
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
9-
xmlns:pages="using:CollapseLauncher.Pages"
109
xmlns:extension="using:CollapseLauncher.Extension"
1110
SizeChanged="MainWindow_OnSizeChanged"
1211
mc:Ignorable="d">
@@ -59,7 +58,7 @@
5958
HorizontalAlignment="Right"
6059
VerticalAlignment="Bottom"
6160
HorizontalContentAlignment="Right"
62-
Content="{x:Bind helper:Locale.Current.Lang._SettingsPage.IntroSequenceToggle}"
61+
Content="{x:Bind helper:Locale.Current.Lang._SettingsPage.IntroSequenceToggle, Mode=OneWay}"
6362
IsChecked="{x:Bind local:MainWindow.IsIntroEnabled, Mode=TwoWay}"
6463
Opacity="0.25"
6564
PointerEntered="IntroSequenceToggle_PointerEntered"

0 commit comments

Comments
 (0)