Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
HelloWRC committed Sep 30, 2024
1 parent f6115cd commit 59591f1
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions ClassIsland/Views/ProfileSettingsWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,7 @@
<Setter Property="ItemTemplate">
<Setter.Value>
<DataTemplate>
<ContentPresenter>
<ContentPresenter.ContentTemplate>
<DataTemplate DataType="{x:Type profile:Subject}">
<TextBlock Text="{Binding Name, Mode=OneWay}"/>
</DataTemplate>
</ContentPresenter.ContentTemplate>
<ContentPresenter.Content>
<MultiBinding Converter="{StaticResource SubjectIdToSubjectConverter}">
<Binding Path="ProfileService.Profile.Subjects" RelativeSource="{RelativeSource FindAncestor, AncestorType=local:ProfileSettingsWindow}"/>
<Binding />
</MultiBinding>
</ContentPresenter.Content>
</ContentPresenter>
<TextBlock Text="{Binding Value.Name, Mode=OneWay}"/>
</DataTemplate>
</Setter.Value>
</Setter>
Expand Down Expand Up @@ -1080,8 +1068,9 @@
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<materialDesign:DataGridComboBoxColumn Header="科目"
ItemsSourceBinding="{Binding MainViewModel.Profile.Subjects.Keys, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:ProfileSettingsWindow}}, UpdateSourceTrigger=PropertyChanged}"
ItemsSourceBinding="{Binding MainViewModel.Profile.Subjects, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:ProfileSettingsWindow}}, UpdateSourceTrigger=PropertyChanged, Mode=OneWay}"
SelectedValueBinding="{Binding SubjectId}"
SelectedValuePath="Key"
ElementStyle="{StaticResource ClassPlanDataGridComboBoxStyle}"
EditingElementStyle="{StaticResource ClassPlanDataGridComboBoxStyle}" />
</DataGrid.Columns>
Expand Down

0 comments on commit 59591f1

Please sign in to comment.