icsharpcode / WpfDesigner

The WPF Designer from SharpDevelop
MIT License
949 stars 251 forks source link

Event handlers in IronPython #24

Closed jhvanderven closed 7 years ago

jhvanderven commented 7 years ago

Hi,

Great work. I'd like to use it in my own application. There is however a requirement to let the user enter the code for any event he or she would like. I was thinking to use this: http://www.thinkbottomup.com.au/site/blog/Embedding_DLR_Scripts_in_XAML_Part_5 Would this be a good idea? And if so, how would I hook up an editor for the event handler code?

Kind regards,

Jan

jogibear9988 commented 7 years ago

I think that could work. But I would not do it like this. I don't save my scripts in XAML, I save them in a extra file (or my case database table). And add them later via the control name. Means I load the XAML, Render it, and after that i attach the event handlers.