ListView with toolbar menu like function - xamarin

I would like to ask a question regarding if it would be possible to make a toolbar like the droid tool bar's secondary items bar inside a listview? Picture shown below:

This is very easy to do. You can put this panel with menu in the header of the listview if you dont mind it to scroll up with the data. Or you can create a grid with 2 rows, put menu panel in row 0, put listview in row 1.

Your question is not very clear. If I understand it correctly, you would like to number the items of a list view.
This can be done by overriding the functionality of the getView() function.
Check for an example here

Related

How can I make the top and bottom elements of my view controller stay in place, while the middle has elements to vertically scroll through?

I'm working in Swift 3 and XCode 8.
I tried to find the answer to this question, but maybe I don't know how to ask it properly. I'm trying to have a title bar at the top of a view controller and have a back and next button at the bottom of the view. The content in between is longer than the space that exists, so I would like the user to be able to scroll the middle, but keep the top and bottom elements anchored in place.
I've tried to use a container with another view controller that is larger than the container to make this happen, but it just resizes the child view controller.
If I'm not explaining something properly, please let me know and I will try to give more information about what I've missed.
I'm making a few assumptions about your Views:
Navigation Bar for your title
Toolbar to hold your Back and Next buttons
Try the following:
Place a Navigation Bar as seen below. Do not set any constraints.
Place a Toolbar as seen below. Again, do not set any constraints.
Place a Scroll View in the centre of your View Controller and expand it so that the top and bottom are aligned with the navigation bar and toolbar respectively. Again, do not set any constraints.
Highlight all of the Views in the View Controller and place them in a Stack View.
Pin the Stack View to the Superview. These are the only constraints that are set in the example below.

How to Animate Items being Added to a ListBox

In extension of the first question I asked here How to Scroll to the Bottom of a ListBox when Items are Added where I discovered how to scroll a ListBox to the most recently added item, I'd like to be able to take this one step further and add in some sort of slide in animation to newly added items. How might this be possible? Any starting points would be of great help.
I use Telerik's DataBoundListBox, it supports add/remove animations in a easy declarative way.

WebBrowser as ListItem and scroll

This question about WP8 project.
I have a LongListSelector with pictures and html formatted text below. Currently each pictire implemented as an Item of the list. The last Item with browser has its own template and shows WebBrowser instead of picture.
I am expected this item behave such as TextBox which I can scroll by interacting with LongListSelector.
But this WebBrowser has it's own scroll inside and intercepts any surrounding scrolling events. Thus whenever I scroll down the list to show WebBrowserControl to the whole screen, I can't go back to the pictures.
Please help me with this issue. What is the appropriate solution? I need a separate pictures since want to implement "Clicked" logic on top of it. And I want to have WebBrowser too (but prefer to behave it similar to RichTextBox (which I can't find in WP8))
USE ListBox.ItemTemplate along with DataTemplate and inside dataTemplate we could custom create xaml tag !

How to know which row in a ListView is selected?

I am working on a simple window form program. The program has a ListView. I need to know which row in the ListView is selected. How I can do that?
Look in the documentation of the ListView class, there are various properties that start with Selected.

Is it possible to remove and move a row of listbox on itself?

Just like the UITableView on iphone.
users can remove or move a row on UITableView.
There is only one button to switch the UITableView to editing mode.
but for listbox on wp7 , I need 3 buttons, one for removing the selected row, one for moving the row up, one for moving the row down.
Welcome any comment
The Windows Phone ListBox doesn't support these features out of the box, but it would be possible to add them yourself using a DataTemplate.
Here's a blog post about creating a custom DataTemplate for your ListItems.
At a high level, you'll need to create a template that contains:
Enter edit mode button
Delete button
Sort up/down buttons
Then in your code, you'll need to toggle the visibility of the delete and sort buttons, as well as handle user clicks on each of the buttons. Doable, but a fair amount of work.
In my opinion, a better option would be to use a approach that's different from what you might be used to but is more familiar to Windows Phone users: the ContextMenu. This control allows you to pop up a menu when the user performs a long touch (tap-and-hold) on an item.
Here's a good tutorial about incorporating this control into your app.
Take a look at re-order ListBox here. It shows how to retemplate the ListBox.
For removing on item, you just need to remove its data source item. See how to use ObservableCollection.
If you want to show effect when an item is removed, use Event Triggers for the Unloaded event.

Resources