<border:SfBorder Padding="6,0,0,0" BorderColor="{Binding Source={x:Reference CountryPicker}, Path=IsFocused, Converter={StaticResource ColorConverter}, ConverterParameter=3}" Style="{StaticResource FormBorderStyle}"> <comboBox:SfComboBox x:Name="CountryPicker" AllowFiltering="True" DataSource="{Binding Countries}" DisplayMemberPath="Value" IsEditableMode="True" NoResultsFoundText="Country not found" Style="{StaticResource ComboBoxStyle}" Watermark="Country"> <comboBox:SfComboBox.DropDownButtonSettings> <comboBox:DropDownButtonSettings> <comboBox:DropDownButtonSettings.View> <Label Margin="0" FontFamily="{StaticResource FontIcons}" FontSize="15" HorizontalTextAlignment="Center" Text="{StaticResource DropDown}" TextColor="{DynamicResource Gray-600}" VerticalTextAlignment="Center" /> </comboBox:DropDownButtonSettings.View> </comboBox:DropDownButtonSettings> </comboBox:SfComboBox.DropDownButtonSettings> </comboBox:SfComboBox> </border:SfBorder>
|
<border:SfBorder
Padding="6,0,0,0"
BorderColor="Green">
<comboBox:SfComboBox x:Name="CountryBox"
AllowFiltering="False"
DataSource="{Binding Countries}"
DisplayMemberPath="Country"
IsEditableMode="True" FocusChanged="CountryPicker_FocusChanged"
SelectionChanged="CountryPicker_SelectionChanged"
NoResultsFoundText="Country not found"
Watermark="Country">
…
</comboBox:SfComboBox>
</border:SfBorder>
<border:SfBorder BorderColor="Red">
<comboBox:SfComboBox x:Name="stateBox" Watermark="State"/></border:SfBorder>
|
|
private void CountryPicker_SelectionChanged(object sender, Syncfusion.XForms.ComboBox.SelectionChangedEventArgs e)
{
stateBox.DataSource = (e.Value as State).States;
stateBox.SelectedItem = null;
stateBox.SelectedIndex = 0;
} |