Xamarin Forms iOS - PickerView with Multi Row Selection - ios

I am using Picker for displaying the items,I want to select multiple rows in picker, is there any way to achieve this in Xamarin Forms shared code or through rendering? any suggestion or idea would be much appreciated.
Thanks.

I don't would use Picker for multilselection.
You can do this with a ListView (100% XF-Code).
I have posted some code some time ago in the XF-forum:
http://forums.xamarin.com/discussion/17885/multiselect-listviews
If you have to show the "Multiselect-ListView" from a ScrollView, you may also be interested to use the PopUp-Control (XLabs):
https://forums.xamarin.com/discussion/33587/how-to-use-a-listview-in-a-scrollview-with-xlabs-popup-control#latest
And finally, if you want to install the XLabs-NuGet, a further posting to XLabs may help you (search for "How to install, setup and use XLabs" in the XF-forum).
As i don't have more than 10 rep-points here, I am not able to post more then two links :-)
Hope this helps...

No there isn't.
The Picker Class, has SelectedIndex property, but no SelectedItems collection. Also, the native control under the hood on iOS doesn't support selecting multiple rows and I don't think the Android or Windows one do either.
You could create use a Custom Renderer if there was a native control you wanted to use. But, it would probably be easier to use a ListView control and add some events and style it to look and behave like you want.

Related

Xamarin iOS project need suggestion

I am developing a survey app using Xamarin and Mvvmcross. Can some one help with suggesting a way to build a View to display questionnaire. These questionnaire will be supplying from my View Model as a List of question with Question Text, Answer options. Based on a flag I need to prompt the questionnaire with input type as drop down or Text boxes. Number of questions can be vary.
In Android I achieved it using MvxGridView and Layout templates. But not sure how to do it in iOS.
You could look up UITableView or UICollectionView and UITextFields and UIPickerView
Wellcome to Xamarin, about your question you can just take look the code I wrote for others, it's a tableview include custom cell to display images, you can just modify the MyTableCell.cs class to display anything you want.
Custom cell tableview(Xamarin.iOS)
If you still need some help, just leave it here, I will check latter.
Hope it can help you.

Creating selectbox in swift

I want to create select box just like creating events in calendar when choosing start time and end time. Any suggestion?
Because I can't find any resources about this.
Please help.
Normally, we handle this using UIDatePicker or custom of UIPickerView. But, it's still able to create something like a select box using UITableView. Some people do want it look like a select box instead of using the native iOS widget. However, we always suggest to use the iOS widget so that user will not get confused because they have adapted to the iOS world.
Using UIPickerView solved the problem.

Is it possible to use Monotouch.Dialog to create a custom list like this?

I just discovered Xamarin Studio and Monotouch.Dialog, and I've been doing a lot of research on custom table cells. So far I've been pretty successful experimenting with some of the features, but I'm having trouble figuring out how to create something like this:
All of the samples I have seen still look like a standard iOS table view, with maybe a few colors changed here and there. My goal is to create truly customized cells, with customized spacing and what not. I'm not sure if this is even possible, so I figured I would ask you guys.
Thanks in advance.
Yes, you can create an OwnerDrawnElement. There's an explanation of this in the Owner-Drawn Element section of this doc:
http://docs.xamarin.com/guides/ios/user_interface/monotouch.dialog
There's also a sample here:
https://github.com/migueldeicaza/MonoTouch.Dialog/blob/master/MonoTouch.Dialog/Elements/OwnerDrawnElement.cs

iOS - Display grid of icons to select

I'm looking to create a grid of icons from which one can be selected (see the Daytum app for an example of this).
Are there any existing form entry frameworks for iOS that already support this (eg QuickDialog is excellent, but doesn't support this)
What would be the best way to implement this? Assuming selecting an icon brings the user back to a form field with the icon populated in the field.
Are there any other apps apart from Daytum that use this 'model?
Three20 has a grid view controller, that makes it pretty easy to add icons in a grid.
I'm a huge fan of AQGridView. Used it in a couple of projects and i think its really really built well and easy to implement.

Blackberry - Custom Grid layout

I need to implement a custom Calendar similar Blackberry native Calendar. I need to mimic almost the same as we see Month view on native Calendar. I tried GridFieldManager, but that doesn't have that much flexibilities. I just went through this site and tried to mimic kind of Calendar view, but I am seeing problem that I need to display the grid lines in a different color and text inside the grids in a different color.
http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800508/How_To_-_Create_a_rich_UI_layout_with_TableLayoutManager.html?nodeid=1906675&vernum=0
Could you please share your thoughts and guide me?
thank you,
Ramesh S

Resources