Skip to content

Commit 3c49d8e

Browse files
committed
Fix Binding error
1 parent 77ffafc commit 3c49d8e

File tree

4 files changed

+32
-25
lines changed

4 files changed

+32
-25
lines changed

Flow.Launcher/Resources/Controls/InfoBar.xaml

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
x:Class="Flow.Launcher.Resources.Controls.InfoBar"
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:cc="clr-namespace:Flow.Launcher.Resources.Controls"
56
xmlns:converters="clr-namespace:Flow.Launcher.Converters"
67
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
78
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@@ -26,21 +27,22 @@
2627
<ColumnDefinition Width="Auto" MinWidth="24" />
2728
</Grid.ColumnDefinitions>
2829
<StackPanel Grid.Column="0" Orientation="Horizontal">
29-
<Border
30-
x:Name="Part_IconBorder"
31-
Width="16" VerticalAlignment="Top"
32-
Height="16"
33-
Margin="0 0 12 0"
34-
CornerRadius="10">
35-
<ui:FontIcon
36-
x:Name="PART_Icon"
37-
Margin="1 0 0 1"
38-
VerticalAlignment="Center"
39-
FontFamily="Segoe MDL2 Assets"
40-
FontSize="13"
41-
Foreground="{DynamicResource Color01B}"
42-
Visibility="Visible" />
43-
</Border>
30+
<Border
31+
x:Name="Part_IconBorder"
32+
Width="16"
33+
Height="16"
34+
Margin="0 0 12 0"
35+
VerticalAlignment="Top"
36+
CornerRadius="10">
37+
<ui:FontIcon
38+
x:Name="PART_Icon"
39+
Margin="1 0 0 1"
40+
VerticalAlignment="Center"
41+
FontFamily="Segoe MDL2 Assets"
42+
FontSize="13"
43+
Foreground="{DynamicResource Color01B}"
44+
Visibility="Visible" />
45+
</Border>
4446

4547
</StackPanel>
4648
<StackPanel
@@ -53,11 +55,11 @@
5355
Margin="0 0 12 0"
5456
FontWeight="SemiBold"
5557
Foreground="{DynamicResource Color05B}"
56-
Text="{Binding Title}" />
58+
Text="{Binding RelativeSource={RelativeSource AncestorType=cc:InfoBar}, Path=Title}" />
5759
<TextBlock
5860
x:Name="PART_Message"
5961
Foreground="{DynamicResource Color05B}"
60-
Text="{Binding Message}"
62+
Text="{Binding RelativeSource={RelativeSource AncestorType=cc:InfoBar}, Path=Message}"
6163
TextWrapping="Wrap" />
6264
</StackPanel>
6365

Flow.Launcher/Resources/Controls/InfoBar.xaml.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ private void InfoBar_Loaded(object sender, RoutedEventArgs e)
1919
UpdateMessageVisibility();
2020
UpdateOrientation();
2121
UpdateIconAlignmentAndMargin();
22-
23-
// DataContext 설정 (예시)
24-
this.DataContext = this; // InfoBar 자체를 DataContext로 사용
22+
//this.DataContext = this;
2523
}
2624

2725
public static readonly DependencyProperty TypeProperty =

Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,15 +188,21 @@ public string Language
188188
UpdateEnumDropdownLocalizations();
189189
}
190190
}
191-
192-
public bool LegacyKoreanIMEEnabled
191+
public bool LegacyKoreanIMEEnabled
193192
{
194193
get => IsLegacyKoreanIMEEnabled();
195194
set
196195
{
197-
SetLegacyKoreanIMEEnabled(value);
198-
OnPropertyChanged(nameof(LegacyKoreanIMEEnabled));
199-
OnPropertyChanged(nameof(KoreanIMERegistryValueIsZero));
196+
Debug.WriteLine($"[DEBUG] LegacyKoreanIMEEnabled 변경: {value}");
197+
if (SetLegacyKoreanIMEEnabled(value))
198+
{
199+
OnPropertyChanged(nameof(LegacyKoreanIMEEnabled));
200+
OnPropertyChanged(nameof(KoreanIMERegistryValueIsZero));
201+
}
202+
else
203+
{
204+
Debug.WriteLine("[DEBUG] LegacyKoreanIMEEnabled 설정 실패");
205+
}
200206
}
201207
}
202208

Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@
322322
Title="{DynamicResource KoreanImeTitle}"
323323
Margin="0 12 0 0"
324324
Closable="False"
325+
DataContext="{Binding RelativeSource={RelativeSource AncestorType=Border}, Path=DataContext}"
325326
IsIconVisible="True"
326327
Length="Long"
327328
Message="{DynamicResource KoreanImeGuide}"

0 commit comments

Comments
 (0)