本文整理汇总了C#中nfloat.GetValueOrDefault方法的典型用法代码示例。如果您正苦于以下问题:C# nfloat.GetValueOrDefault方法的具体用法?C# nfloat.GetValueOrDefault怎么用?C# nfloat.GetValueOrDefault使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nfloat
的用法示例。
在下文中一共展示了nfloat.GetValueOrDefault方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ToRightOf
public static FluentLayout ToRightOf(this UIView view, UIView previous, nfloat? margin = null)
{
return view.Left().EqualTo().RightOf(previous).Plus(margin.GetValueOrDefault(DefaultMargin));
}
示例2: Above
public static FluentLayout Above(this UIView view, UIView previous, nfloat? margin = null)
{
return view.Bottom().EqualTo().TopOf(previous).Minus(margin.GetValueOrDefault(DefaultMargin));
}
示例3: WithRelativeHeight
public static FluentLayout WithRelativeHeight(this UIView view, UIView previous, nfloat? scale = null)
{
return view.Height().EqualTo().HeightOf(previous).WithMultiplier(scale.GetValueOrDefault(DefaultScale));
}
示例4: Below
public static FluentLayout Below(this UIView view, UIView previous, nfloat? margin = null)
{
return view.Top().EqualTo().BottomOf(previous).Plus(margin.GetValueOrDefault(DefaultMargin));
}
示例5: AtBottomOf
public static FluentLayout AtBottomOf(this UIView view, UIView parentView, nfloat? margin = null)
{
return view.Bottom().EqualTo().BottomOf(parentView).Minus(margin.GetValueOrDefault(DefaultMargin));
}
示例6: AtLeftOf
public static FluentLayout AtLeftOf(this UIView view, UIView parentView, nfloat? margin = null)
{
return view.Left().EqualTo().LeftOf(parentView).Plus(margin.GetValueOrDefault(DefaultMargin));
}
示例7: FullHeightOf
public static IEnumerable<FluentLayout> FullHeightOf(this UIView view, UIView parent, nfloat? margin = null)
{
var marginValue = margin.GetValueOrDefault(DefaultMargin);
yield return view.Top().EqualTo().TopOf(parent).Plus(marginValue);
yield return view.Bottom().EqualTo().BottomOf(parent).Minus(marginValue);
}
示例8: FullWidthOf
public static IEnumerable<FluentLayout> FullWidthOf(this UIView view, UIView parent, nfloat? margin = null)
{
var marginValue = margin.GetValueOrDefault(DefaultMargin);
yield return view.Left().EqualTo().LeftOf(parent).Plus(marginValue);
yield return view.Right().EqualTo().RightOf(parent).Minus(marginValue);
}