xamarin/Xamarin.Forms
[Bug] Toggle label parent element visibility does not rerender properly
Open
#7,486 opened on Sep 12, 2019
help wantedp/Androidp/iOS 🍎t/bug :bug:up-for-grabs
Repository metrics
- Stars
- (5,644 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
Description
With the following xaml setting the StackLayout visibility to true does not update the size of the Label. This is incorrect if the Label content was changed while the StackLayout was not visible.
<StackLayout IsVisible="{Binding IsVisible}">
<Label
Text="{Binding Field}"
HorizontalOptions="Start"
BackgroundColor="Gold"
/>
</StackLayout>
Steps to Reproduce
- Download the attached project
- Edit the entry content, and verify the label size is correctly updated
- Hide the label by clicking the toggle button
- Edit the entry content
- Show the label by clicking the toggle button, and see that the label size is invalid (possibly cutting off some words)
- Edit the entry content, and observe the label update.
Expected Behavior
When the label is set to visible, I expect the label to have the correct size.
Actual Behavior
The label is either too small or too big depending if content was added or removed.
Basic Information
- Version with issue: 4.2.0.709249
- Last known good version: None
- IDE: VS2019
- Platform Target Frameworks:
- iOS: all tested versions
- Android: all tested versions
- UWP: not tested
Screenshots
