View Issue Details

IDProjectCategoryView StatusLast Update
0002321NoesisGUIUnity3Dpublic2022-04-12 10:32
Reporterckfinite Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Status newResolutionopen 
Product Version3.1.4 
Summary0002321: Custom RoutedEventArgs
DescriptionThe usual WPF idiom for passing information about a routed event is to subclass RoutedEventArgs and provide properties that hold the relevant information. However, this is very hard to do in Noesis, as (from the managed API at least) RoutedEventArgs's implementation is very deeply entwined with the native implementation. Adding support for custom RoutedEventArgs would make it easier to implement custom routed events in an application.
Steps To ReproduceAs an example, suppose we have
[code]
  class ResizeEventArgs : RoutedEventArgs
  {
    public float Amount {get;}
    public ResizeEventArgs(RoutedEvent @event, object sender, float amount) :
      base(@event, sender)
      { this.Amount = amount; }
  }
[/code]
If we attempt to use ResizeEventArgs as an EventArgs then Noesis will error with
[code]
InvalidOperationException: Event args for ResizeEventHandler have to define the method 'static void InvokeHandler(Delegate handler, IntPtr sender, IntPtr args)'
[/code]
Implementing InvokeHandler from a user perspective is practically impossible, making it very difficult to use this custom RoutedEventArgs implementation.
TagsNo tags attached.
PlatformAny

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2022-04-05 21:17 ckfinite New Issue
2022-04-12 10:32 ckfinite Product Version 3.1.5 => 3.1.4