View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002321 | NoesisGUI | Unity3D | public | 2022-04-05 21:17 | 2022-04-12 10:32 |
Reporter | ckfinite | Assigned To | |||
Priority | normal | Severity | feature | Reproducibility | always |
Status | new | Resolution | open | ||
Product Version | 3.1.4 | ||||
Summary | 0002321: Custom RoutedEventArgs | ||||
Description | The 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 Reproduce | As 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. | ||||
Tags | No tags attached. | ||||
Platform | Any | ||||