Trey Copeland
Trey Copeland

Reputation: 3527

How would you create stackable rectangles in Xamarin C# for iOS?

I have a UIView that I want to fill with multiple rectangles stacked on top of each other horizontally at 100% width. They all need to have their own name and need to work for any iOS device regardless of size.

Here's a simple diagram showing what I would like to accomplish:

Stacked rectangles

Upvotes: 1

Views: 613

Answers (3)

Adam Ivancza
Adam Ivancza

Reputation: 2529

I would recommend XibFree for this: http://www.toptensoftware.com/xibfree/

They have a few great examples which covers these case as well: http://www.toptensoftware.com/xibfree/example_2

http://www.toptensoftware.com/xibfree/example_1

If you would need any more help with XibFree feel free to ask anything in comment :)

Upvotes: 0

angak
angak

Reputation: 406

I find it difficult to control the exact sizes of StackLayouts if you're not sure of the size of your content. If i need something to stay fixed size, i use Grids:

http://iosapi.xamarin.com/?link=T%3aXamarin.Forms.Grid

Upvotes: 3

Miguel Rochefort
Miguel Rochefort

Reputation: 542

With Xamarin.Forms, this is achieved by using a StackLayout.

http://iosapi.xamarin.com/?link=T%3aXamarin.Forms.StackLayout

Upvotes: 3

Related Questions