Getting XAML from HumanUI element somehow?

My final goal is to get rounded corners for a stack of elements. I’m a complete noob with wpf but after googling for a while it seems that the only way to get rounded corners is to use Border element as a parent object of a StackPanel. As HumanUI doesn’t have a Border at the moment my tricky plan was to convert my Stack component to XAML, wrap it manually with and feed it back to ‘Create Objects From XAML’ component.

I wonder if there’s a way to do it with c# component somehow? Like referencing some HumanUI library and writing a magic line of code? Any help would be much appreciated.

Hi archimax –

I have been wanting to add border options for StackPanels to HumanUI for a while now. I have a project which may necessitate that in the near future, so I will let you know if I end up adding and submitting a PR to the OS repo.

In the meantime, I wish it were possible to reference a dll and operate on elements directly, but currently only the MainWindow class is abstracted out into the HumanUIBaseApp dll. All of the helper functions and custom classes for elements are contained within the GHA project, which I don’t think you can reference in a C# component. Never tried it but I assume it doesn’t work.

I actually think it would be useful to move all the custom classes and helper methods into the referenced dll, because it would make prototyping new components and features much easier (e.g., possible) for end users. This is a pretty major structural change to the plugin, though, so I’m not sure how high on the priority list this is. If you are comfortable with building from source, you can always clone the OS repo and start contributing! :slight_smile:

As for hacks and workarounds you might be able to do with XAML, @andheum can definitely answer that much better than I can. I’m just about to get into some XAML experimentation myself, so I’m curious to hear his thoughts on the matter.


1 Like

In fact, GHAs are just DLLs - you can reference them in a c# component like any other library. However, I don’t know of any way to get XAML out of an element, with or without a reference to the library. In any case, doing so would likely break other functionality with the plug-in, so I don’t think this approach is viable. As far as I can see, nothing short of coding a new Border element container type wrapping the Border class would do the trick.

something like this:

1 Like

now available on yak and food4rhino


Phhh… That was fast!
Andrew ‘Bolt’ Heumann, ladies and gentlemen!

Awesome – saves me a PR! :slight_smile:

Also – Good to know that GHAs can be referenced for tinkering…