本文整理汇总了C#中UISlider.Below方法的典型用法代码示例。如果您正苦于以下问题:C# UISlider.Below方法的具体用法?C# UISlider.Below怎么用?C# UISlider.Below使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UISlider
的用法示例。
在下文中一共展示了UISlider.Below方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ViewDidLoad
public override void ViewDidLoad()
{
View.BackgroundColor = UIColor.White;
base.ViewDidLoad();
var subTotal = new UITextField() { BorderStyle = UITextBorderStyle.RoundedRect };
subTotal.KeyboardType = UIKeyboardType.DecimalPad;
Add(subTotal);
var seek = new UISlider()
{
MinValue = 0,
MaxValue = 100,
};
Add(seek);
var seekLabel = new UILabel();
Add(seekLabel);
var tipLabel = new UILabel();
Add(tipLabel);
var totalLabel = new UILabel();
Add(totalLabel);
var set = this.CreateBindingSet<TipView, TipViewModel>();
set.Bind(subTotal).To(vm => vm.SubTotal);
set.Bind(seek).To(vm => vm.Generosity);
set.Bind(seekLabel).To(vm => vm.Generosity);
set.Bind(tipLabel).To(vm => vm.Tip);
set.Bind(totalLabel).To("SubTotal + Tip");
set.Apply();
View.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints();
var margin = 10;
View.AddConstraints(
subTotal.AtLeftOf(View, margin),
subTotal.AtTopOf(View, margin),
subTotal.AtRightOf(View, margin),
seek.WithSameLeft(subTotal),
seek.Below(subTotal, margin),
seek.ToLeftOf(seekLabel, margin),
seek.WithRelativeWidth(seekLabel, 3),
seekLabel.WithSameRight(subTotal),
seekLabel.WithSameTop(seek),
tipLabel.Below(seek, margin),
tipLabel.WithSameLeft(seek),
tipLabel.WithSameWidth(totalLabel),
totalLabel.WithSameTop(tipLabel),
totalLabel.ToRightOf(tipLabel, margin),
totalLabel.WithSameRight(subTotal)
);
}