Using v2.0.0 of FluentAvalonia, the sizes of Tabs in a TabView are occasionally not correct. This can be seen in the ControlsGallery sample.
In any of the TabView examples that support closing tabs (though the 2nd example seems to work best), close the last tab then add a new tab without moving the cursor after pressing add, the Tab will be too small until the cursor moves out of the tab, at which point it will resize to the correct size. This is likely a race condition as it doesn't always exhibit this behaviour.
A bit of debugging suggests the issue is that the UpdateTabWidths function is being called too soon. It's being called when the TabItems collection changes, however at that point the underlying presenter panel has not been modified, hence ContainerFromIndex for the tab returns null and nothing is resized.
I think we can post UpdateTabWidths to the Dispatcher to ensure it runs after the next layout pass when the items are realized. Just tested that and it does seem to work.
Using v2.0.0 of FluentAvalonia, the sizes of Tabs in a TabView are occasionally not correct. This can be seen in the ControlsGallery sample.
In any of the TabView examples that support closing tabs (though the 2nd example seems to work best), close the last tab then add a new tab without moving the cursor after pressing add, the Tab will be too small until the cursor moves out of the tab, at which point it will resize to the correct size. This is likely a race condition as it doesn't always exhibit this behaviour.
A bit of debugging suggests the issue is that the
UpdateTabWidths
function is being called too soon. It's being called when the TabItems collection changes, however at that point the underlying presenter panel has not been modified, henceContainerFromIndex
for the tab returns null and nothing is resized.