My XAML looks like this:
<me:MyControl x:Name="Publisher">
<me:MyControl.Triggers>
<EventTrigger RoutedEvent="me:MyControl.MyEvent">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetName="Publisher"
Storyboard.TargetProperty="Opacity"
To="1" Duration="0:0:1"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger -->
</me:MyControl.Triggers>
</me:MyCo开发者_开发百科ntrol>
When this loads I get an exception saying
Attribute me:MyControl.MyEventvalue is out of range
I've tried
- me:MyControl.MyEvent
- MyControl.MyEvent
- MyEvent
- Publisher.MyEvent
What's the magic incantation to get this to work?
You've be looking at WPF examples, Silverlight doesn't directly support any trigger other than for the loaded event.
Consider using the VisualStateManager instead. You then need to change the state via code on the event.
加载中,请稍侯......
精彩评论