I'd like to initialize an Entry with a text value but only after it is fully rendered. The reason is, if the Text property is initialized before rendering, the Entry grows (its Width increases) for long strings, which don't fit inside the Entry. The Entry itself is inside a Grid and I'd like it to keep it fixed size, therefore my attempts to initialize it after allocating size. I tried to set Text in OnSizeAllocated method of the View which contains control, but I encountered a non-deterministic exception. It looks like it is not the right context to assign value to Text property. Does anybody know a better way? Or another way of preventing Entry control from resizing itself when its Text is set before rendering?
↧