Esempio n. 1
0
        public static NSTextField CreateLabel(string text)
        {
            var textField = new NSTextField();

            textField.StringValue     = text;
            textField.DrawsBackground = false;
            textField.Editable        = false;
            textField.Bezeled         = false;
            textField.Selectable      = false;
            textField.SizeToFit();
            textField.CenterTextVertically();
            return(textField);
        }
Esempio n. 2
0
 public static void CenterTextVertically(this NSTextField self)
 {
     self.CenterTextVertically(self.Frame);
 }