Separators in Xamarin.Forms
Asked 07 September, 2021
Viewed 997 times
  • 65
Votes

I'd like to use horizontal separator lines in a form. As far as I found out, Xamarin.Forms doesn't provide one.

Could someone provide a snippet for separators?

UPDATE 1

According to Jason's proposal, this looks fine:

// draws a separator line and space of 5 above and below the separator    
new BoxView() { Color = Color.White, HeightRequest = 5  },
new BoxView() { Color = Color.Gray, HeightRequest = 1, Opacity = 0.5  },
new BoxView() { Color = Color.White, HeightRequest = 5  },

Renders the below separator line:

enter image description here

8 Answer