Plugin.SegmentedControl icon indicating copy to clipboard operation
Plugin.SegmentedControl copied to clipboard

Minimum width on UWP

Open grantjames opened this issue 6 years ago • 2 comments

I'm having trouble with some kind of minimum width restraint on UWP.

If I make the control narrow enough, the alignment of the text in each segment looks off because the width of each individual segment seems to have some sort of minimum width and so they end up overlapping.

Capture

Note I've used the UI inspector in the image above to outline the SegmentRadioButton showing how the next segment is overlapping it.

I've downloaded the repo and had a look at the code and I can't see any explicit reference to a width in the UWP project. I did notice there was a hard coded Padding property in SegmentedRadioButtonStyle.xaml but I've changed this and it doesn't seem to have any effect.

Any help with this would be greatly appreciated. Thank you.

grantjames avatar Aug 02 '19 09:08 grantjames

I've managed to fix this. I'll create a pull request when I get time.

In the meantime, the fix is to add MinWidth = 0 in the SegmentRadioButton creation in the CreateSegmentedRadioButtonControl() of SegmentedControlRenderer.

grantjames avatar Aug 02 '19 12:08 grantjames

How does it look with the fix?

tNRevan avatar Nov 19 '20 13:11 tNRevan