Hi,
There is problem with binding.
<ContentView.BindingContext>
<local:HistoryViewModel/>
</ContentView.BindingContext><telerikInput:RadListPicker x:Name="typeListPicker" Placeholder="Select Type" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" HeightRequest="40" WidthRequest="200" Margin="5"
ItemsSource="{Binding TypesItems}"
DisplayMemberPath="Value"
SelectedItem="{Binding Types, Mode=TwoWay}"><telerikInput:RadListPicker.ItemTemplate><DataTemplate><Label Text="{Binding Value}"
HorizontalTextAlignment="Center"
VerticalTextAlignment="Center"/></DataTemplate></telerikInput:RadListPicker.ItemTemplate></telerikInput:RadListPicker>
private SchedulerTypeItem _types;
public HistoryViewModel()
{
InitTypesItem();
}
private void InitTypesItem()
{
TypesItems = new ObservableCollection<TypesItem>()
{
new TypesItem { Value = "Push" },
new TypesItem { Value = "Pull" },
};
}
public SchedulerTypeItem Types
{
get
{
return _types;
}
set
{
if (_types != value)
{
_types = value;
OnPropertyChanged();
}
}
}
Commad
======
if (Types != null && !string.IsNullOrEmpty(Types.Value)) // throw init innitlized exception
{
historyReport = new ObservableCollection<HistoryReport>(historyReport.Where(hr => hr.Type == Types.Value));
}