MultiLine Picker item in Xamarin Forms - xamarin.forms

I want to use a picker for selecting question from list of questions in picker item for mobile devices in Xamarin Forms. Some of these questions are long strings which does not fit in one line and so picker could not able to display complete question. Is there a way to handle this long string to adjust it into multi line based upon device width.

What about ListView + SearcBar (modal page)?

Related

How to make drag and drop in Xamarin forms

I have different controls in my XAML page which consists of charts in Xamarin.Forms. The functionality that I want to achieve is to make a long press on each chart, then drag and drop the chart to another place.
I am taking this as an example : https://canbilgin.wordpress.com/2018/03/17/re-order-listview-items-with-drag-drop-ii/
But I dont have a listview in my XAML page.
How can I achieve this in XF ?
You can set a Draggable View, and put inside your Images / Graphs or whatever.
A good tutorial can be followed here

Xamarin Forms ListView scrolled to top?

I have a InfiniteListView which extend ListView from Xamarin Forms.
I know when you on the last item in the list but how can i figure out if the user scrolled to the top of the list ?
Unfortunately, the Xamarin Forms ListView does not expose a Scrolled event or Position property. So your only option is to use the ItemAppearing and ItemDisappearing events.
When you subscribe to these events, you can figure out if the first cell is appearing again, after it disappeared first. This does not actually give you a 100% correct outcome, since it can happen that only a part of the first cell is shown.
If you want a perfect check that you are at the absolute top, you will have to resort to a custom renderer:
On iOS you can make use of the tableView.contentOffset.y property on the UITableView.
On Android it's a little bit more involved, as there are multiple (but no straightforward) ways to achieve this. See this answer for one possibility. This approach is originally meant for saving and restoring scroll position, so adjust it to your needs.
Other platforms have similar ideas. Check which native control the Xamarin Forms renderer creates, and then search the internet for possible solutions for that specific platform.

Choosing between ListView and Grid in Xamarin Forms

I have just started developing with Xamarin, and in me getting familiar with the different views/ui controls - given that ListView has an ItemTemplate property, which seems I can use to "embed" any combination of views I want - should I then go with ListView or Grid when I care about displaying different views in a single row ?
I mean, using a ListView with a StackLayout as template, with Stack orientation set to Horizontal... vs a grid ?
Looking at the Xamarin.Forms Control Gallery it states the following:
ListView: https://developer.xamarin.com/guides/xamarin-forms/controls/views/
An ItemView that displays a collection of data as a vertical list.
Grid: https://developer.xamarin.com/guides/xamarin-forms/controls/layouts/
A layout containing views arranged in rows and columns.
Therefore from those two definitions you can derive the following:
If you have a list of Employees I would use a ListView
Where as if I have a login Form where I need to display a username and password box it would be correct to use a Grid. Using a list be more difficult and give less flexability.
Obviously the final decision is up to you

Create dynamic table using TableView in xamarin forms

I am new in Xamarin forms and I need to implement a table in Xamarin forms. Requirement is-
Initially table will be empty and has four columns. After feeling form and clicking on submit button, new entry will be added in table. First column is Test, second column is single radio button, third column is again single radio button and forth column is button to delete that row it self.
I need to know which approach will be suitable to implement this requirement. Is it grid layout or tableview or something else.
Consider Table View use cases vs List View use cases. Table views are meant for static content. You should really consider a list view for dynamic content. (like adding a row with views) Being new to Xamarin.Forms, you should take the time to read completely through the documentation as (at least for me) it wasn't straightforward. Also, consider a WebView as radio buttons are not going to play nicely across platforms, and your problem would be easily solvable with jQuery.

How to increase list View's Separator length in Xamarin forms iOS?

I want to increase list View's Separator length(spacing between two cells).
I am not getting how can I do it in xamarin forms by using custom renderer and I am looking for iOS only.
I want to create card view in iOS (by using xamarin forms) just like facebook application.
I Implemented it with frame control.
1.I created one customized cell in List View (Using ViewCell).
Then Added frame in it.
2.Removed Separator in a List View by Using Custom Renderer.
Use HasUnevenRows="True" in your ListView and it should adapt to your item height.

Resources