Hi
I am coming across multiple issues every 10 minutes or so trying to get the SfComboBox to behave itself on UWP, i havent
come across any control in any language that is as rotten as this one is and im struggling to fix any of them. some are so intermittent
i cant even describe them, and searching for them on the web is proving useless
i accept there are things i may be doing incorrectly, however cant be too far out as it all works perfect on android
as i say, The issues i mention below ONLY HAPPEN ON UWP
i use INPC and an observable collection
private ObservableCollection<DbJob> _jobList;
public ObservableCollection<DbJob> JobList
{
get { return _jobList; }
set { _jobList = value; }
}
i have tried both async and non-async methods but it just wont play ball with either
i want a simple 2 column dropdown & the xaml is as follows
<sfinputLayout:SfTextInputLayout
Margin="5,-5,0,0"
Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="3"
ShowHelperText="False"
ContainerType="Outlined"
Hint="Select A Job">
<sfcombobox:SfComboBox
HeightRequest="50"
WidthRequest="800"
DataSource="{Binding JobList}"
DisplayMemberPath="Name"
HorizontalOptions="StartAndExpand"
SelectedItem="{Binding SelectedJob, Mode=TwoWay}">
<sfcombobox:SfComboBox.ItemTemplate>
<DataTemplate>
<StackLayout Orientation="Horizontal" Padding="5,0,0,0">
<Label Text="{Binding Code}" WidthRequest="50" VerticalTextAlignment="Center"/>
<Label Text="{Binding Name}" VerticalTextAlignment="Center"/>
</StackLayout>
</DataTemplate>
</sfcombobox:SfComboBox.ItemTemplate>
</sfcombobox:SfComboBox>
</sfinputLayout:SfTextInputLayout>
just some of the stuff i have come across are the following
ISSUE #1
if i dont have the WidthRequest in, it chops the text off so its only about 20% of the width of the control at a guess. this is not needed in android, it works ok without
ISSUE #2
it takes 2 clicks on the down arrow to open it up the first time you click it
ISSUE #3
i can't set my datasource using an async method, i have to do it in the constructor. this i can live with, however when i come to add items to the list
or rebuild the list later it either wipes it all out or if i just do a simple:
JobList.Add(new DbJob { Code = 123, Name = "BOOBY PRIZE" });
it's either added to the list but blank (shows an empty line) or doesnt add it at all
if i try repeat it, it either adds another blank line (the data is there in the list) or just doesnt add the second occurance
sometimes the whole list is blank, but its the correct height for the number of items the list contains, the lines are just invisible
ISSUE #4
sometimes if i select an item in the list, then refresh the list by clearing it and re-adding items, it still leaves the last item
i selected highlighted in the list, even though the list was cleared, items re-added and the SelectedItem has changed
i am not setting the list to null.
i just dont know where to go with this control on UWP, this has been a wasted day after getting it working so easily on android, so any
advice would be good
thanks
Bob