Articy Forum


https://www.articy.com:443/forum/

Custom UI via plugins?

https://www.articy.com:443/forum/viewtopic.php?f=4&t=18137

Page 1 of 1

Custom UI via plugins?

Posted: Fri 17. Mar 2017, 21:47
by doday
While reading the MacroPlugin API docs, I saw this in MacroPLugin.Initialize: "If your plugin uses own WPF resource dictionaries you need to register them within this method using RegisterResource(String)"

I have limited experience with WPF. Does this mean I can add custom UI to Articy? If not, what is the usecase for adding in your own WPF resource dictionaries?

Re: Custom UI via plugins?

Posted: Sat 18. Mar 2017, 01:59
by [Articy] Nico Probst
Yes you can add custom UI! This is mostly useful for settings, custom views etc. The only limitation is that the plugin ui can only be in their own window.
In the coming weeks we will release a plugin that will show you how you can utilize WPF for creating a settings dialog for your plugin.

Best regards

Nico

Re: Custom UI via plugins?

Posted: Tue 21. Mar 2017, 00:11
by doday
That sounds great. I look forward to the plugin.

Re: Custom UI via plugins?

Posted: Mon 17. Apr 2017, 19:14
by RisingSun
[Nevigo] Nico Probst wrote:Yes you can add custom UI! This is mostly useful for settings, custom views etc. The only limitation is that the plugin ui can only be in their own window.
In the coming weeks we will release a plugin that will show you how you can utilize WPF for creating a settings dialog for your plugin.

Best regards

Nico


Hi, new here. I'm quite competent at WPF and having recently learned of Articy, I'd love to know more about this feature. This reply was back in March - has there been any updates or info on these custom UI windows?

Re: Custom UI via plugins?

Posted: Tue 18. Apr 2017, 09:37
by [Articy] Nico Probst
Hi,

This reply was back in March - has there been any updates or info on these custom UI windows?


No official updates, sorry for that :oops:. But the plugin turned out to be bigger than expected, thus the delay. But hopefully we can release the plugin soon.

The tutorial for the WPF integration still has to wait a bit, because i have a lot of other things to do before that.

But i can give you some information to get you started:

  • Follow the instructions here to create a new plugin for articy:draft.
  • In Visual Studio you can add a UserControl (WPF) that will automatically take care of adding the necessary assembly references. (For some reason you can't add windows at this point, at least in my VS version)
  • In both UserControl files (xaml and cs) change the UserControl type to Window. Effectively turning it into a window.
  • Now just create a plugin menu button(using MacroCommandDescriptor) to open the window, using ShowDialog() for example.
  • (Optional) You could pass in the ApiSession instance from the plugin to the window, to get access to plugin methods inside event handles for buttons for example.
  • (Styling) You can even use our custom styles for controls, but you need to know the name of the styles, luckily this is mostly <ControlName>Style. For example TextBoxStyle, ButtonStyle etc.

Hope that gives you a rough idea how to get this to work.

Best regards

Nico

Re: Custom UI via plugins?

Posted: Tue 18. Apr 2017, 10:29
by RisingSun
Awesome - thanks a bunch! :D

Re: Custom UI via plugins?

Posted: Wed 9. Aug 2017, 10:14
by Rollercoaster
I can't wait for the plugin you guys are talking about, would be just great.

All times are UTC
Page 1 of 1