Hi Chris,
We have checked your query regarding Entry field in the SfDataForm does not look correct in the SfDataForm Xamarin Forms UWP. In SfDataForm by default we have assigned height to the editor in the source. Thus, the text is not vertically centered based on the given height. Even for Entry, if you set this height, it will also look like the text editor in SfDataForm. However, if your requirement is to align text in vertical center, it can be achieved using custom editor. Kindly refer online user guide documentation for creating custom editor.
In the custom entry renderer for UWP, set the vertical alignment for the control as center.
[assembly: ExportRenderer(typeof(CustomEntry), typeof(CustomEntryRenderer))]
public class CustomEntryRenderer : EntryRenderer
{
protected override void OnElementChanged(ElementChangedEventArgs<Entry> e)
{
base.OnElementChanged(e);
if (Control != null)
{
Control.VerticalAlignment = Windows.UI.Xaml.VerticalAlignment.Center;
}
}
} |
We have attached the sample for your reference and you can download the same from the following location.
Output:
If the provided solution doesn’t meet your requirement, please revert us with more information regarding your query along with screenshots if possible so that we could analyze on it and provide you with the better solution.
Regards,
Jayaleshwari N.