I am using an entry control of Xamarin.Forms for the iOS and Mac platforms. The problem I have is that I can control the horizontal alignment but not the vertical. I want to vertically center the text in the entry control but I am not able to do so.
I haven't found any solution for Xamarin but I did find a few links in Swift or Objective-C. So, I converted this code to C# and it doesn't work.
The below code is in the Mac renderer for my entry:
var newRect =new CGRect(x: 0, y: 15, width: 30, height: 30);
Control.Cell.DrawingRectForBounds(newRect); //NSTextField
This doesn't change the UI.
Can you please tell me how to set text vertically center in Mac and iOS project?