本文整理汇总了C#中System.Windows.CornerRadius.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# CornerRadius.ToString方法的具体用法?C# CornerRadius.ToString怎么用?C# CornerRadius.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.CornerRadius
的用法示例。
在下文中一共展示了CornerRadius.ToString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CtorFourDoubles
public void CtorFourDoubles ()
{
CornerRadius cr = new CornerRadius (4, 3, 2, 1);
Assert.AreEqual ("4,3,2,1", cr.ToString (), "ToString");
CornerRadius cr2 = new CornerRadius (4, 3, 2, 1);
Assert.IsTrue (cr == cr2, "== true");
Assert.IsFalse (cr != cr2, "== false");
cr.TopLeft = 0;
cr.TopRight = 0;
cr.BottomRight = 0;
cr.BottomLeft = 0;
CheckProperties (cr, 0);
Assert.IsFalse (cr == cr2, "== false");
Assert.IsTrue (cr != cr2, "== true");
}
示例2: CtorDouble
public void CtorDouble ()
{
CornerRadius cr = new CornerRadius (0);
CheckProperties (cr, 0);
cr.TopLeft = 1;
cr.TopRight = 2;
cr.BottomRight = 3;
cr.BottomLeft = 4;
Assert.AreEqual ("1,2,3,4", cr.ToString (), "ToString");
CornerRadius cr2 = new CornerRadius (0);
Assert.IsFalse (cr.Equals (cr2), "!Equals");
Assert.IsFalse (cr2.Equals (cr), "!Equals2");
Assert.IsFalse (cr.Equals (null), "Equals(null)");
Assert.IsTrue (cr.Equals (cr), "Equals(self)");
Assert.Throws<ArgumentException> (delegate {
new CornerRadius (-0.1);
}, "Negative");
}
示例3: CtorDefault
public void CtorDefault ()
{
CornerRadius cr = new CornerRadius ();
CheckProperties (cr, 0);
Assert.AreEqual ("0,0,0,0", cr.ToString (), "ToString");
}