プロジェクトに少し問題があります。私はアイテムごとに をListBox
持っています。Checkbox
はCheckbox
からコンテンツをListBox
取得しますが、項目の選択とチェックボックスから IsChecked を接続するにはどうすればよいですか?
私の計画では、チェックボックスをオンにすると、チェックボックスがオンになっている行が削除されます。それ、どうやったら出来るの?
これまでの私のXAML:
<ListBox x:Name="To_do_Liste" ItemsSource="{Binding}" Height="593"
Margin="0,85,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5"
BorderBrush="#FDFFE818" Background="#FFFFE818"
IsSynchronizedWithCurrentItem="False" IsDoubleTapEnabled="True"
IsHoldingEnabled="True" IsRightTapEnabled="True"
ScrollViewer.VerticalScrollBarVisibility="Auto" ManipulationMode="All"
FontFamily="SketchFlow Print" HorizontalAlignment="Left" Width="320"
SelectionMode="Extended">
<ListBox.ItemTemplate>
<DataTemplate>
<ListBoxItem HorizontalContentAlignment="Stretch">
<CheckBox x:Name="CheckBox1" Foreground="Black"
BorderBrush="#FF007FFF" Content="{Binding}" FontFamily="SketchFlow Print"
FontSize="26" />
</ListBoxItem>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>