Hi,
I can get items from API and I know selected item but item is not set as selected with no error. List is filled properly and I can see (in debug) selected item is gathered in the same object. However binding not working.
PS: I use MVVM.
Please see attached files. The abstract of the relavant part is below. Thanks in advance :)
ViewModel part;
if (response.Status)
{
IncomeDetail = JsonConvert.DeserializeObject<IncomeDetail>(response.Data.ToString());
Item = IncomeDetail.Item;
IncomeDetail.FinancialPlan.ID = FinancialPlanId;
SelectedIncomeType = IncomeDetail.IncomeType;
BudgetAmount = IncomeDetail.BudgetAmount;
ActualAmount = IncomeDetail.ActualAmount;
TargetPayDate = IncomeDetail.TargetPayDate;
ActualPayDate = IncomeDetail.ActualPayDate;
SelectedItemLevel = IncomeDetail.ItemLevel;
Notes = IncomeDetail.Notes;
}
Xaml part;
<inputLayout:SfTextInputLayout
Grid.Row="5"
Grid.Column="1"
Grid.ColumnSpan="2"
ContainerType="Outlined"
Hint="Öncelik"
ReserveSpaceForAssistiveLabels="False">
<Picker
x:Name="pickerLevel"
ItemDisplayBinding="{Binding Name}"
ItemsSource="{Binding ItemLevel}"
SelectedItem="{Binding SelectedItemLevel}" />
</inputLayout:SfTextInputLayout>
Picker is not coming with Selected ItemLevel whereas I can see in debug mode.
Attachment:
Picker_SelectedItem_Mvvm_6301eafd.zip