WPF XAML Intellisense doesn't work correctly for custom routed event handlers -


itemprop = "text">

I defined a custom event routed with the following constructs (rename):

Public category MyRoutedEventArgs: Routing Aventrages {...}

Public Representative MyRoutedEventHandler (Object Sender, MyRoutedEventArgs args) is free;

Public static read-only RoutedEvent MyEvent;

MyClass.MyEvent = EventManager.RegisterRoutedEvent ("MyEvent", RoutingStrategy.Tunnel, typeof (MyRoutedEventHandler), typeof (MyClass));

Next, I am creating a CLR event wrapper:

Public Event MyRoutedEventHandler MyEvent {addHandler (MyEvent, value); } Remove {RemoveHandler (MyEvent, value); }}

The problem is that when I define it as shown above, the XALL Intellence Handler method does not work to automate the body. What I have seen is that if you change your CLR event cover to use the normal Routed Aventahandler type, then everything works! However in this case, the automatic generating method is a normal RoutedEventArgs (fine, correctly corresponding to the RoutedEventHandler), which compelled me to manually rewrite it as MyRoutedEventArgs.

I think this is currently a limitation with which you have to live. But all you have to do is change the signature of the generated method to use MyRoutedEventArgs instead of RoutedEventArgs, once the eventhandler for the normal type was autotargeted. Allthough still ugly (we should not be forced to do this) I think it's not such a big problem

Anyone tried it with VS 2010?


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -