-
-
Notifications
You must be signed in to change notification settings - Fork 162
-
-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Objects as Choices in MaterialTextInput #56
Comments
Update on this feature request. I tried to implement the current What I was able to do is to use a converter to get the property value of the item, and put the property name in the converter parameter. So in Xaml, it would look like this: <material:MaterialTextField Choices="{Binding Companies, Converter={StaticResource ChoiceConverter}, ConverterParameter=CompanyName}"
HelperText="*Required"
InputType="Choice"
Placeholder="Company" /> |
I guess it's a decent solution, but what could be done if we want to retrieve the Selected Item? Maybe I'm diverging a little from original issue, but let's say you want the MaterialTextInput to act exactly like a picker. So, we could have a OnSelectedItemEvent. Following the Companies example, we would have a SelectedCompany property on ViewModel. When user interacts and selects a choice (from the converted string array), we could dispatch an OnSelectedItemEvent). Ultimately, we could simply set SelectedCompany by SelectedIndex. |
Hmm. Currently, if the input type is set to Perhaps for the mean time, I can implement your suggested solution but I will also add a command property (say |
Hi, I removed the |
Hi Dustin! Nice! I will try ASAP. Thanks a lot for this awesome plugin. |
Thanks. Package is still building, it will be visible for download ~30 mins. |
Is your feature request related to a problem? Please describe.
Possibility to use objects as "Choices" in the MaterialTextField. Nowadays, this control only support an array of strings.
Describe the solution you'd like
Just like the built-in Picker solution, it would be nice if we could just set an ItemsSource attribute and ItemDisplayBinding to bind the value which should be shown.
Describe alternatives you've considered
Using the built-in Picker solution.
The text was updated successfully, but these errors were encountered: