Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<Label Text={Binding .} /> works in Debug but not Release #8182

Closed
polygonsheep opened this issue Jun 20, 2022 · 5 comments
Closed

<Label Text={Binding .} /> works in Debug but not Release #8182

polygonsheep opened this issue Jun 20, 2022 · 5 comments
Labels
legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor platform/iOS 🍎 s/needs-info Issue needs more info from the author s/no-recent-activity Issue has had no recent activity s/triaged Issue has been reviewed t/bug Something isn't working

Comments

@polygonsheep
Copy link

polygonsheep commented Jun 20, 2022

Description

Trying to use a BindableLayout to display a List of strings, e.g. List MyStringList = {"Joe", "Mark", "Sarah", "Andy"}

Following xaml code works in the iOS Simulator & Android Emulator in Debug but not Release and not when published to an iPhone or Android phone. No text is displayed in Release

<VerticalStackLayout BindableLayout.ItemSource="{Binding MyStringList}"> <BindableLayout.ItemTemplate> <DataTemplate> <Label Text="{Binding .}" /> </DataTemplate> </BindableLayout.ItemTemplate> </VerticalStackLayout>

Also tried and both work on simulators not on devices.

dotnet version 6.0.301

Steps to Reproduce

  1. Create a new Maui App
  2. Add a List in the code behind
  3. Add below code to xaml contentpage

Version with bug

Unknown/Other (please specify)

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android

Affected platform versions

iOS 15, Android 12

Did you find any workaround?

no

Relevant log output

No response

@polygonsheep polygonsheep added s/needs-verification Indicates that this issue needs initial verification before further triage will happen t/bug Something isn't working labels Jun 20, 2022
@polygonsheep
Copy link
Author

the bug report deleted my code.

Here it is again

<VerticalStackLayout BindableLayout.ItemsSource="{Binding MyStringList}"> <BindableLayout.ItemTemplate> <DataTemplate> <Label Text="{Binding .}"/> </DataTemplate> </BindableLayout.ItemTemplate> </VerticalStackLayout>

@polygonsheep polygonsheep changed the title <Label Text={Binding .} /> works on iOS & Android Emulators but not physical devices <Label Text={Binding .} /> works in Debug but not Release Jun 20, 2022
@Eilon Eilon added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Jun 20, 2022
@PureWeen PureWeen added platform/iOS 🍎 and removed s/needs-verification Indicates that this issue needs initial verification before further triage will happen labels Jun 22, 2022
@polygonsheep
Copy link
Author

More info, if you add the DataType to the DataTemplate the text will show up in Release mode.
<DataTemplate x:DataType="x:String">

The DataType is not required in Debug mode.

@kristinx0211
Copy link

@polygonsheep not repro the issue, tell me if I miss something, my project: MauiApp20.zip

image

@kristinx0211 kristinx0211 added the s/triaged Issue has been reviewed label Jun 29, 2022
@rachelkang rachelkang added the s/needs-info Issue needs more info from the author label Jun 29, 2022
@ghost
Copy link

ghost commented Jun 29, 2022

Hi @polygonsheep. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@ghost ghost added the s/no-recent-activity Issue has had no recent activity label Jul 4, 2022
@ghost
Copy link

ghost commented Jul 4, 2022

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

@ghost ghost closed this as completed Jul 7, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Aug 6, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor platform/iOS 🍎 s/needs-info Issue needs more info from the author s/no-recent-activity Issue has had no recent activity s/triaged Issue has been reviewed t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants