Open domneedham opened 5 months ago
If a label uses spans in the formatted string, it doesn't seem to register it as children on the element.
<Label MaxLines="2" LineBreakMode="WordWrap" VerticalOptions="Center"> <Label.FormattedText> <FormattedString> <Span Text="Text One" /> <!--Add blank space between normal text and link text--> <Span Text=" " /> <Span Text="Text Two" TextDecorations="Underline"> <Span.GestureRecognizers> <TapGestureRecognizer Command="{Binding CommandHere}" /> </Span.GestureRecognizers> </Span> </FormattedString> </Label.FormattedText> </Label>
Therefore, the spans are not getting cleared in TearDownImpl.
TearDownImpl
Adding the following seems to work.
if (vte is Label label) { if (label.FormattedText != null) { TearDownImpl(label.FormattedText); } }
Happy to discuss further if required.
Agreed. PR or I'll try to get to it when I can.
If a label uses spans in the formatted string, it doesn't seem to register it as children on the element.
Therefore, the spans are not getting cleared in
TearDownImpl
.Adding the following seems to work.
Happy to discuss further if required.