-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Picker ‘SelectedIndex’ is not effective #10305
Comments
Hi @JusterZhu. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md 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. |
You entered the .NET MAUI repository under the reproduction link, please add the right link so we can have a look, thanks! |
I don't know how to fill in the correct path. It is not necessary to submit an issue before. |
Hi @JusterZhu , what @jfversluis meant is that you should provide a link to the code repository which .NET MAUI team can use to run and view your issue. Before you share your code, make sure you remove things you can't share with the public. For an example, just take a look at some other issues where users have shared their code. |
Same or similar to #7138 |
|
Description
When Piker binds a collection or creates Picker.Items, setting SelectedIndex to 0 in xaml does not take effect, and UI has no effect.
Steps to Reproduce
XAML:
<StackLayout Margin="0,0,100,0" Grid.Row="7" Orientation="Horizontal" HeightRequest="35" HorizontalOptions="Center"> <Label VerticalOptions="Center" Text="encoding :"></Label> <Picker WidthRequest="400" HeightRequest="30" Margin="9,0,3,0" SelectedIndex="0" ItemsSource="{Binding Encodings}" /> </StackLayout>
C#:
public List<string> Encodings { get { if (_currentEncoding == null) { _encodings = new List<string>(); _encodings.Add("Default"); _encodings.Add("UTF8"); _encodings.Add("UTF7"); _encodings.Add("Unicode"); _encodings.Add("UTF32"); _encodings.Add("BigEndianUnicode"); _encodings.Add("Latin1"); _encodings.Add("ASCII"); } return _encodings; } }
Link to public reproduction project repository
https://github.com/dotnet/maui
Version with bug
6.0.486 (current)
Last version that worked well
6.0.408
Affected platforms
Windows
Affected platform versions
windows10.0.19041
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: