我有自己的形状课
public sealed class MirrorTile : Shape
在这堂课中,我添加了事件
public static readonly RoutedEvent SelectedEnterEvent = EventManager.RegisterRoutedEvent("SelectedEnter", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(MirrorTile));
public event RoutedEventHandler SelectedEnter
{
add
{
this.AddHandler(SelectedEnterEvent, value);
}
remove
{
this.RemoveHandler(SelectedEnterEvent, value);
}
}
并想以这种方式使用它
<shapes:MirrorTile>
<shapes:MirrorTile.Triggers>
<EventTrigger RoutedEvent="SelectedEnter">
<BeginStoryboard Storyboard="{StaticResource SelectShape}"/>
</EventTrigger>
</shapes:MirrorTile.Triggers>
</shapes:MirrorTile>
启动后我得到异常:
{"RoutedEventConverter cannot convert from System.String."}
我做错了什么,我该如何解决这个问题?