ListBox
a の内容がオブジェクトのリストであることを指定しました。
<telerik:RadListBox x:Name="listViewTakeOffConfigurations"
ItemsSource="{Binding EstimateTakeoffService.EstimatingTakeOffConfigurations}" >
は次のItemTemplate
ように設定されています。
<telerik:RadListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Path=FontName}" />
<TextBlock Grid.Column="1" Text="Sample" FontFamily="{Binding FontName}" Foreground="{Binding Path=FontColour, Converter={StaticResource hexColorToBrushConverter}}" FontSize="{Binding Path=FontSize}" FontStyle="{Binding Path=SelectedItem, Converter={StaticResource estimatingTakeOffConfigurationToFontStyleConverter}, Mode=OneWay}" VerticalAlignment="Centre" Margin="5,0,0,0"/>
</Grid>
</DataTemplate>
</telerik:RadListBox.ItemTemplate>
2 番目のテキスト ボックスの FontStyle に問題があります。{binding} のようなバインディングを設定する必要があるリストボックス内のすべての項目にバインドしたいのですが、それではコンバーターを追加できないため、とにかくフォントスタイルは設定されません。
誰か提案がありますか?
ありがとう