![]() Your view model should have a property SelectedBlockName. You typically bind this ComboBox.SelectedValue to the same view model (data context) that exposes the source collection, in your case the BlockDetails collection. Both properties serve the same purpose of exposing the currently selected item. You use ComboBox.SelectedValue instead of ComboBox.SelectedItem, if you are not interested of the actual data item, but a specific value of this item. You have ComboBox.DisplayMemberPath to select the property of this data type, which should be displayed by the ComboBox in the drop down.įinally you have ComboBox.SelectedValuePath to select a property of this data type to be the ComboBox.SelectedValue. ![]() You have an object or data type that is an item of the ComboBox. I think you either confused the SelectedValue property or missed to post some details. In my model the class is declared as follows, public class VmServiceMethodBlockDefinition : BindableBaseThreadSafe But the problem is it doesn't select/display the item. When I expand the combobox I can see the items inside it. All Xamarin UI controls are written in Objective-C for iOS and Java/Kotlin for Android and are seamlessly integrated with the Xamarin Forms platform. I have a combobox which is bound to a property called "BlockDetails" in the viewmodel.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |