나는 토글 버튼에 대한 다음 XAML 있습니다토글 버튼에서 IsChecked가 변경되지 않는 이유는 무엇입니까?
<ToggleButton Margin="0,3" Grid.Row="3" Grid.ColumnSpan="2" Command="{Binding DataContext.SelectAllCommand, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}">
<ToggleButton.Style>
<Style TargetType="{x:Type ToggleButton}">
<Setter Property="Content" Value="Select All"/>
<Style.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Content" Value="Select None"/>
<Setter Property="Command" Value="{Binding DataContext.SelectNoneCommand, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"/>
</Trigger>
</Style.Triggers>
</Style>
</ToggleButton.Style>
</ToggleButton>
을하지만 버튼을 클릭 할 때 IsChecked
속성이 업데이트되지 없구요.
나는 스눕를 사용에서 다음 True로 트리거 킥을의 IsChecked을 강제로.
명령은 무엇을 수행합니까? 내가 명령을 제거하고 Content 속성 만 설정하면 제대로 작동합니다. –