[Python.NET] Cast PyObject to RoutedEventHandler
Denis Akhiyarov
denis.akhiyarov at gmail.com
Wed Jun 20 00:18:00 EDT 2018
Have you tried @clrmethod decorator?
https://github.com/pythonnet/pythonnet/blob/master/src/runtime/resources/clr.py#L54
https://github.com/pythonnet/pythonnet/blob/master/src/tests/test_clrmethod.py#L14
On Tue, Jun 19, 2018 at 10:37 AM, WARD Steve <Steve.Ward at oxinst.com> wrote:
> Can anyone tell me how to cast or Convert (or use a TryGet, or As
> whatever…), a PyObject (a Python function), to a C# RoutedEventHandler?
>
>
>
> The Python function:
>
>
>
> def OnStartButton(sender,args):
>
> #do stuff
>
> pass
>
>
>
> Thanks
>
> Steve
> ____________________________________________________________
> _______________
> This e-mail is confidential and is for the addressee only. Please refer
> to
> www.oxinst.com/email-statement for regulatory information.
>
> _________________________________________________
> Python.NET mailing list - PythonDotNet at python.org
> https://mail.python.org/mailman/listinfo/pythondotnet
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythondotnet/attachments/20180619/4eef3a31/attachment.html>
More information about the PythonDotNet
mailing list