I would like to create a Masonry (or Staggered Grid) effect with Xamarin.Forms like the following image (source of image https://masonry.desandro.com/) that works for both iOS and Android
Asked
Active
Viewed 360 times
0

Salvo
- 169
- 1
- 1
- 14
-
Hey Salvo, did you find a solution? – Erdogan May 17 '20 at 22:17
-
no @Erdogan, I'm sorry – Salvo May 18 '20 at 13:55
-
You can follow the topic; https://stackoverflow.com/questions/61861777/masonry-list-style-in-xamarin – Erdogan May 18 '20 at 14:05
1 Answers
0
According to your description, you want to use one control like wrappanel in WPF, am I right? If yes, I suggest you can follow these steps to do.
1.create Wraplayout class, inherit Layout in PCL.you can take a look:
2.Using this Wraplayout.
<xf:WrapLayout>
<Button Text="Button A" />
<Button Text="Button B" WidthRequest="250" />
<Button Text="Button C" WidthRequest="150" />
<Button Text="Button D" />
<Button Text="Button E" WidthRequest="200" />
</xf:WrapLayout>

Cherry Bu - MSFT
- 10,160
- 1
- 10
- 16
-
-
@Salvo,According to your screenshot, do you want to use one control like wrappanel in wpf? – Cherry Bu - MSFT Sep 24 '19 at 09:31
-
No, I would like to create a Masonry effect in two columns as in this link https://codepen.io/chriscoyier/pen/pqEgBV It is not the width of the elements that gives me problems, but their height and the "interlocking" anchor – Salvo Sep 24 '19 at 10:22
-
@Salvo, II haven't found a better way to do it yet, like Masonry effect, if you have way to do this, please share here. – Cherry Bu - MSFT Sep 27 '19 at 08:05