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
Added PickerElement #25
Conversation
Thanks :) I think Reflect.cs could have been OK left alone - dialog's not really used Thanks again - will pull and build later (hopefully tonight) Stuart On 3 September 2012 13:08, Tomasz Cielecki notifications@github.com wrote:
|
Hi CheeseBaron It's been a much longer week at work than I hoped :/ But finally getting some time to build and run code today :) Do you have a sample anywhere for this PickerElement - especially one including a ViewModel I just had a play with a simpler one column picker element using the code below. I think this approach should enable the same ViewModel to be used in WP7, Droid and Touch - a bit like http://stackoverflow.com/questions/12160239/mvvmcross-binding-lists-in-monotouch - but doesn't have multiple components in the picker.
Still looking at this - but interested to look at this more - wondering if I can dig out some more advanced picker examples or if I can switch to a subtable-type approach... Stuart |
I was doing something quite hack-ish to update the ViewModel, as I did not want to have UI code in my model. So I kind of made a Property that reflected the values of the original Property, which I use on Android and WP7, so that the PickerElement will understand it. By this I mean that I made a Property of the type Though I tried to make it so that it supported multiple Components, hence I made the two interfaces IPickerComponent and IPickerComponentRow. This way it was easier to know that the only kind of data the PickerElement accepts are derivatives of the IPickerComponent. I was thinking of refining the PickerElement, with a default converter which magically could take any type of data and represent it in the PickerElement, but I have not come to do that yet. The SimplePickerElement would work for me, but it would be so neat if one could make a general implementation, which worked for all sorts of data. |
This simple PickerElement is in vNext now - https://github.com/slodge/MvvmCross/blob/vnext/Cirrious/Cirrious.MvvmCross.Dialog.Touch/Elements/PickerElement.cs I'm not going to pull the more complex IPickerComponent PickerElement - I don't want to include it in the core library at present because I feel it requires too much knowledge/explanation in the ViewModel. At some point, I'll try to find time to do some documentation and/or blogging about this - when this happens (when i find time) I will try to include this more complex example - I think it's exactly the sort of thing that people building really slick/full apps will want to do do. Thanks for the comments - sorry I'm not pulling right now! Stuart |
…hone fix different behavior in FilePlugin MvvmCross#24
Added samples
Upgrades references to MvvmCross (4.0.0.0-beta1) to (4.0.0.0-beta3). …
Hey Stuart,
Here is my PickerElement implementation, check it out. Not sure what to do in the Reflect.cs file, or if I even have to do anything in there.