本文整理汇总了C#中UILabel.Right方法的典型用法代码示例。如果您正苦于以下问题:C# UILabel.Right方法的具体用法?C# UILabel.Right怎么用?C# UILabel.Right使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UILabel
的用法示例。
在下文中一共展示了UILabel.Right方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowView
private void ShowView(){
var startDate = (new DateTime (1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).AddMilliseconds (VTSModelTmp.VTSModel.StartDate).ToLocalTime ();
var endDate = (new DateTime (1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).AddMilliseconds (VTSModelTmp.VTSModel.EndDate).ToLocalTime ();
_vacationType = new UILabel ();
_vacationType.Text = VTSModelTmp.VTSModel.VacationType;
View.Add (_vacationType);
_vacationStartDate = new UILabel ();
_vacationStartDate.Text = _localizer.Localize("startDate");
View.Add (_vacationStartDate);
_vacationStartDateBtn = new UIButton ();
_vacationStartDateBtn.SetTitle(startDate.ToString("d"), UIControlState.Normal);
_vacationStartDateBtn.SetTitleColor(UIColor.Blue, UIControlState.Normal);
View.Add (_vacationStartDateBtn);
_vacationEndDate = new UILabel ();
_vacationEndDate.Text = _localizer.Localize("endDate");
View.Add (_vacationEndDate);
_vacationEndDateBtn = new UIButton ();
_vacationEndDateBtn.SetTitle(endDate.ToString("d"), UIControlState.Normal);
_vacationEndDateBtn.SetTitleColor(UIColor.Blue, UIControlState.Normal);
View.Add (_vacationEndDateBtn);
_vacationStatusTitle = new UILabel ();
_vacationStatusTitle.Text = _localizer.Localize("status");
View.Add (_vacationStatusTitle);
_vacationStatus = new UILabel ();
_vacationStatus.Text = _localizer.Localize("cancelled");
View.Add (_vacationStatus);
_vacationError = new UILabel ();
_vacationError.Text = "";
//_vacationError.Text = _localizer.Localize("dateError");
_vacationError.LineBreakMode = UILineBreakMode.WordWrap;
_vacationError.Lines = 0;
_vacationError.TextColor = UIColor.Red;
View.Add (_vacationError);
_vacationPickImageFromGallery = new UIButton ();
_vacationPickImageFromGallery.SetTitle(_localizer.Localize("pickImgFromGallery"), UIControlState.Normal);
_vacationPickImageFromGallery.SetTitleColor(UIColor.Blue, UIControlState.Normal);
View.Add (_vacationPickImageFromGallery);
_vacationImageView = new UIImageView ();
if (VTSModelTmp.VTSModel.Image != null) {
NSData imageData = NSData.FromArray(VTSModelTmp.VTSModel.Image);
_vacationImageView.Image = UIImage.LoadFromData(imageData);
}
View.Add (_vacationImageView);
_vacationUpdateBtn = new UIButton ();
_vacationUpdateBtn.SetTitle(_localizer.Localize("update"), UIControlState.Normal);
_vacationUpdateBtn.SetTitleColor(UIColor.Blue, UIControlState.Normal);
View.Add (_vacationUpdateBtn);
View.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints ();
var screen = UIScreen.MainScreen.Bounds;
var screenWidth = (float)screen.Width;
var screenHeight = (float)screen.Height;
View.AddConstraints (
_vacationType.Top().EqualTo().TopOf(View).Plus(screenHeight/5),
_vacationType.CenterX().EqualTo().CenterXOf(View),
_vacationStartDate.Top().EqualTo().BottomOf(_vacationType).Plus(10),
_vacationStartDate.CenterX().EqualTo().CenterXOf(View).Minus(70),
_vacationStartDate.Left().EqualTo().LeftOf(View).Plus(5),
_vacationStartDateBtn.Top().EqualTo().BottomOf(_vacationType).Plus(3),
_vacationStartDateBtn.Right().EqualTo().RightOf(View).Minus(5),
_vacationEndDate.Top().EqualTo().BottomOf(_vacationStartDateBtn).Plus(3),
_vacationEndDate.CenterX().EqualTo().CenterXOf(View).Minus(70),
_vacationEndDate.Left().EqualTo().LeftOf(View).Plus(5),
_vacationEndDateBtn.Top().EqualTo().BottomOf(_vacationStartDateBtn).Minus(5),
_vacationEndDateBtn.Right().EqualTo().RightOf(View).Minus(5),
_vacationStatusTitle.Top().EqualTo().BottomOf(_vacationEndDate).Plus(10),
_vacationStatusTitle.CenterX().EqualTo().CenterXOf(View).Minus(50),
_vacationStatusTitle.Left().EqualTo().LeftOf(View).Plus(5),
_vacationStatus.Top().EqualTo().BottomOf(_vacationEndDateBtn).Plus(4),
_vacationStatus.Right().EqualTo().RightOf(View).Minus(5)
);
if (VTSModelTmp.VTSModel.Status != "greenCircle.png") {
View.AddConstraints (
_vacationUpdateBtn.Top().EqualTo().BottomOf(_vacationStatusTitle),
_vacationUpdateBtn.CenterX().EqualTo().CenterXOf(View),
_vacationError.Top().EqualTo().BottomOf(_vacationUpdateBtn),
//.........这里部分代码省略.........