- Home
- Forum
- Xamarin.Forms
- Grid row dividers not consistently shown
Grid row dividers not consistently shown
Attachment: sfdatagrid_7d0e688d.zip
Can you please let us know the device density value of your testing device. It will help us to check the issue and provide you a better solution asap.
Regards,
Karthik Raja
Can you please refer the below document to get screen density value of your testing device.
https://docs.microsoft.com/en-us/xamarin/essentials/device-display?tabs=android
Regards,
Karthik Raja
Hi Graham
Lee
Based on device density, drawing a border of width
1(default value) will result in a border drawn for 2.25 pixels in your device.
This results in that pixel being shared, for 0.25% for drawing border and the
remaining 0.75% for the next view canvas.
So this phenomenon of pixel sharing happens in devices
that has this decimal densities. Whereas devices with whole densities like 3,4
usually don't have these issues. So as to test the same, please try setting
border width as 1.33 or 1.77 and test in your 2.25 density device
you can set border like this
|
public DataGridPage()
{ InitializeComponent();
this.DataGrid.GridSyle = new MyStyle
} |
|
public class MyStyle:DataGridStyle
{
public override float GetBorderWidth()
{ return 1.33f;
} } |
Regards,
Ranjith Kumar
- 5 Replies
- 3 Participants
- Marked answer
-
GL Graham Lee
- May 24, 2021 11:20 AM UTC
- May 31, 2021 01:10 PM UTC