How to bind Checked event for radio button in WPF?
Posted
by nullDev
on Stack Overflow
See other posts from Stack Overflow
or by nullDev
Published on 2010-03-30T06:43:20Z
Indexed on
2010/03/30
8:53 UTC
Read the original article
Hit count: 591
I am using the following markup in WPF:
<StackPanel.Triggers>
<EventTrigger RoutedEvent="RadioButton.Checked" SourceName="xmlRadioButton">
<EventTrigger.Actions>
<BeginStoryboard Storyboard="{StaticResource ShowXmlPanel}"/>
</EventTrigger.Actions>
</EventTrigger>
<EventTrigger RoutedEvent="RadioButton.Checked" SourceName="adiRadioButton">
<EventTrigger.Actions>
<BeginStoryboard Storyboard="{StaticResource ShowAdiPanel}"/>
</EventTrigger.Actions>
</EventTrigger>
</StackPanel.Triggers>
Though this works fine when I run the code, I get the following error in the designer window of VS 2008:
Value 'RadioButton.Checked' cannot be assigned to property 'RoutedEvent'. Invalid event name.
Any idea why, and how can I fix this?
© Stack Overflow or respective owner