本文整理匯總了C#中System.Windows.Shapes.Rectangle.Show方法的典型用法代碼示例。如果您正苦於以下問題:C# Rectangle.Show方法的具體用法?C# Rectangle.Show怎麽用?C# Rectangle.Show使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Windows.Shapes.Rectangle
的用法示例。
在下文中一共展示了Rectangle.Show方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: CreateTransformer
//.........這裏部分代碼省略.........
R.MoveTo(
p.Black.x + Math.Cos(a.R.a + n.a) * a.R.z * n.z,
p.Black.y + Math.Sin(a.R.a + n.a) * a.R.z * n.z
);
G.MoveTo(
p.Black.x + Math.Cos(a.G.a + n.a) * a.G.z * n.z,
p.Black.y + Math.Sin(a.G.a + n.a) * a.G.z * n.z
);
M.MoveTo(
p.Black.x + Math.Cos(a.M.a + n.a) * a.M.z * n.z,
p.Black.y + Math.Sin(a.M.a + n.a) * a.M.z * n.z
);
Y.MoveTo(
p.Black.x + Math.Cos(a.Y.a + n.a) * a.Y.z * n.z,
p.Black.y + Math.Sin(a.Y.a + n.a) * a.Y.z * n.z
);
Update();
RotationInfo = p.White;
};
AsMovableByMouse(Black, null);
AsMovableByMouse(White, UpdateRotation);
var TranslationInfo = new { x = 0.0, y = 0.0 };
TranslationInfo = null;
Action ShowVisuals =
delegate
{
g0.Show();
GB.Show();
RB.Show();
Orange.Opacity = 1;
var e = new[] { M, R, G, Y, White, Black };
foreach (var k in e)
{
k.Show();
k.BringToFront();
}
};
Action UpdateTranslation =
delegate
{
ShowVisuals();
var p = new
{
Orange = new { x = Canvas.GetLeft(Orange), y = Canvas.GetTop(Orange) },
White = new { x = Canvas.GetLeft(White), y = Canvas.GetTop(White) },
Black = new { x = Canvas.GetLeft(Black), y = Canvas.GetTop(Black) },
R = new { x = Canvas.GetLeft(R), y = Canvas.GetTop(R) },
G = new { x = Canvas.GetLeft(G), y = Canvas.GetTop(G) },