Hi, currently I’m trying to give a custom made control a default size by setting the width and height to 100 pixels in C#. I want to set a default size on the control so that it isn’t 0 by 0 pixels when you drag it into the UI Builder, but I want the size to be editable after it has been added to the UI. So far I haven’t got it working the way I intend yet.
I’ve been able to give the control a default size by changing the style in C# inside of the constructor of the control or the Init method from UxmlTraits. With both of these implementations it was not possible to resize the control when it was in the UI Builder, because it seems that the constructor and thus the Init method as well, get called whenever you change the control in any way (including when you change the size).
Is there currently a way to give a custom made control a default size in C# that is editable in the UI Builder afterwards?