Layout horizontally and multiple lines - xamarin

I'd like to layout a bunch of child Views horizontally. If children fill a row, they should allocate more space and continue the render process in the next row. This process should continue, as long as children are left to get rendered.
May I use this using Xamarin.Forms views?

There are no wrapping layouts currently in Xamarin.Forms, but you can achieve this quid easily with a RelativeLayout, as it allows to have constraint for childs relative to its parent.

Related

How to share selection rectangle between multiple NSCollectionViews?

I am building an app, which will draw a representation of column-based data. I need both interactable cells and headers, so instead of adding suppplementary views for each column, I made another NSCollectionView that contains headers only.
The issue is that I would like to share selection rectangle state between these collection views, but I am not sure if there's some good way to achieve that or I have to hack whole controller.
Initially I was thinking about making an overlay on whole window, that would register in first responder chain, but it would use methods like draggedMouse only in my own methods and I would override built-in to pass the events to views behind, then if the view detected that user would like to draw a selection rectangle (select multiple items), that event would be moved to overlay view.
I thought also about making first row of items as sections (I am using compositional collection view layout, so it isn't that hard), but I think it would make features like drag and drop a huge pain in the bottom.
On the image you can see part of these collection views and how it looks now.

SWT resize dynamically scroll of composite

I have created a composite which has three children - Composite 1, 2 and 3. The children try to recreate the functionality of expand items in an expandbar. I want to make my parent composite scrollable vertically, so that all children are visible when expanded. I also want the size of the scroll to be changed dynamically as the composite gets bigger because it is possible to expand only one item, or two, or all three of them (see pictures for demonstration). How can I achieve that? Thanks in advance.

How to render only visible nodes inside a ScrollPane?

I'm using JavaFX to show thousands of nodes inside a ScrollPane. It gets laggy on nodes more than about 50. I'm adding each node by pane.getChilderen.add(myNewNode); and then move them to a specific position on the pane. How to make a pane to only render visible items to optimize the performance? Thanks.

Xamarin.UITest: Retrieving elements hidden from screen

I want to write a UI test for my Xamarin.iOS app to make sure that all tableview elements/cells exist on a screen. I could use app.Query(e => e.All()), but this will only retrieve elements that are currently visible on the screen. Is there a way to retrieve all elements (including the ones hidden from the view) in order to assert that the retrieved elements are as expected, without initiating a scroll action?
Any suggestions are greatly appreciated.
There isn't a way to do it directly, but there are methods to scroll list views down to get more items, but the original ones will then be removed from the visual tree.
Table views use cell recycling, so they only creates enough cells to fill the screen. As you scroll cells that are scrolled off the top are 'recycled' and shown on the bottom with new data. This means that the cells of screen actually don't exist - so there is nothing that UI test can access.
I've done it in the past by getting the items and caching some values, scrolling, getting more items, scrolling etc, building up a list of items as I go. Then once there is no more to scroll, checking the values.

Swap children's depth

I am using canvas and createjs. I have a container that has an eventListener attached to it so that any child in that container can be selected. When a child is selected I can drag it around on the stage but it is relative to its index so it is above some children and below others. I would like to move the above child to the top index. In flash I was able to swap the depth of that child and I was wondering if there is something similar in Javascript?
Thx.
All you gotta do is:
yourContainer.addChild(selectedChild);
this will pull your object to the top of your display list.

Resources