この質問は避けましたが、ListBoxの選択されたインデックスを設定できません。他のスレッドを読んで設定を適用しましたが、機能しません。
<ListBox ItemsSource="{Binding}"
HorizontalAlignment="Right"
Name="lstReading" Height="Auto"
SelectedIndex="{Binding BookmarkSelectedIndex}">
something.xaml.csでは、私は設定です
lstReading.DataContext = IQText;
ここで、IQTextはであり、 asデータ要素IEnumerable<dictIQ>
を含みます。BookmarkSelectedIndex
IQTextの他のデータ要素を使用することはできますが、listindexを設定することはできません。誰かが理由を教えてもらえますか?