부울 값에 따라 텍스트가 변경되는 하이퍼 링크를 만들려고합니다. CheckBox의 IsChecked 메서드를 활용할 수 있다고 생각했습니다. 그래서 CheckBox에 대해이 ControlTemplate을 작성했습니다.CheckBox 템플릿에서 상태 확인이 업데이트되지 않았습니다.
<CheckBox Checked="CheckBox_Checked" IsChecked="{Binding Path=SomeBool, Mode=TwoWay}">
<CheckBox.Template>
<ControlTemplate TargetType="{x:Type CheckBox}">
<BulletDecorator>
<BulletDecorator.Bullet>
<TextBlock>
<Hyperlink>
<TextBlock x:Name="TextBoxHyperlink">Unchecked</TextBlock>
</Hyperlink>
</TextBlock>
</BulletDecorator.Bullet>
<ContentPresenter />
</BulletDecorator>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="TextBoxHyperlink"
Property="Text"
Value="Checked" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</CheckBox.Template>
</CheckBox>
하지만 하이퍼 링크를 클릭해도 아무런 변화가 없습니다. 확인 상태는 변경되지 않고 TextBlock의 Text 속성은 업데이트되지 않습니다. 어떤 아이디어?