CopyPastor

Detecting plagiarism made easy.

Score: 0.8297337889671326; Reported for: String similarity Open both answers

Original Post

Original - Posted on 2023-03-01
by Alexandar May - MSFT



            
Present in both answers; Present only in the new answer; Present only in the old answer;

It is a potential issue on **iOS**. For now, setting the `SelectedItem` property from ViewModel is not working on **iOS**. And it is a known issue that is being tracked in the links below, you can follow up there.
https://github.com/dotnet/maui/issues/13059
https://github.com/dotnet/maui/issues/13072
You can try the workaround(awkaward however useful) as suggested by Glorfindel like below:
``` _ = Task.Run(async () => { await Task.Delay(100); Dispatcher.Dispatch(() => { SelectedStates = new ObservableCollection<object>(ss); OnPropertyChanged(nameof(SelectedStates)); }); }); ```
Yes, it is a potential issue on iOS. For now, setting the `SelectedItem` property from `ViewModel` is not working on iOS. And it is a known issue that is being tracked in the links below, you can follow up there.
https://github.com/dotnet/maui/issues/13059
https://github.com/dotnet/maui/issues/13072
As a workaround(awkaward however useful) suggested by Glorfindel like below:
``` _ = Task.Run(async () => { await Task.Delay(100); Dispatcher.Dispatch(() => { SelectedStates = new ObservableCollection<object>(ss); OnPropertyChanged(nameof(SelectedStates)); }); }); ```

        
Present in both answers; Present only in the new answer; Present only in the old answer;