I developped a component which change input names depending on what it’s connected to. I’d like to redraw and resize the component when a change occurs, ideally without triggering the recomputation.
I’m using OnDisplayExpired(true) method, it renames inputs perfectly but doesn’t resize the component according to the new names. Kindly have a look to the screenshot below. The redraw occurs only when you click somewhere else on the Canvas.
You’ll have to expire the layout of the component attributes if you want it to recompute the size and positioning of subobjects.
this.Attributes.ExpireLayout();
this.Attributes.PerformLayout(); // You probably do not need to call this as it should happen automatically.
this.OnDisplayExpired(true);