Just stumbled upon this old thread while looking into a related topic and thought i might help anyone that finds this^^
- Create your Style class, it needs to inherit from FSlateWidgetStyle. Implement all the UPROPERTYs it needs. Best practice is to also use a decorator pattern for initializing the values later.
- You need to register a FSlateStyleSheet at module startup (and unregister it at shutdown) with the FSlateStyleRegistry. In the engine code this is done by having a singleton style class (such as FCoreStyle) create all your FSlateWidgetStyles and register them with the FSlateStyleSheet.
- You can now access the singleton style instance via the “Get()” function of your style, then look up the style sheet you need by its key.
- If you want to set the style at runtime, you need to create a UObject wrapper that can be used by the SetStyle function in UMG.
I recommend looking at CoreStyle.h/cpp and related source code for the details^^