本文整理汇总了C#中System.Windows.Shapes.Rectangle.Hide方法的典型用法代码示例。如果您正苦于以下问题:C# Rectangle.Hide方法的具体用法?C# Rectangle.Hide怎么用?C# Rectangle.Hide使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Shapes.Rectangle
的用法示例。
在下文中一共展示了Rectangle.Hide方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateTransformer
//.........这里部分代码省略.........
{
x = p.Orange.x - TranslationInfo.x,
y = p.Orange.y - TranslationInfo.y,
};
if (q.x == 0)
if (q.y == 0)
{
TranslationInfo = p.Orange;
return;
}
RotationInfo = null;
R.MoveTo(p.R.x + q.x, p.R.y + q.y);
G.MoveTo(p.G.x + q.x, p.G.y + q.y);
Y.MoveTo(p.Y.x + q.x, p.Y.y + q.y);
M.MoveTo(p.M.x + q.x, p.M.y + q.y);
Black.MoveTo(p.Black.x + q.x, p.Black.y + q.y);
White.MoveTo(p.White.x + q.x, p.White.y + q.y);
Update();
TranslationInfo = p.Orange;
};
var OrangeDrag = AsMovableByMouse(Orange, UpdateTranslation);
OrangeDrag.Enter = () => OrangeSelfAverage = false;
OrangeDrag.Exit = () => OrangeSelfAverage = true;
Reset();
UpdateRotation();
Update();
var rr = new TransformerControl
{
SetOpacity =
Opacity =>
{
g1.Opacity = Opacity;
g2.Opacity = Opacity;
},
SetSource =
src =>
{
g1.Source = src;
g2.Source = src;
},
HideMirror =
delegate
{
Y.Opacity = 0.2;
g1.Hide();
},
HideVisuals =
delegate
{
g0.Hide();
GB.Hide();
RB.Hide();
Orange.Opacity = 0.05;
var e = new[] { M, R, G, Y, White, Black };
foreach (var k in e)
{
k.Hide();
}
},
SetBounds =
args =>
{
var e = new[] { M, R, G, Y };
for (int i = 0; i < args.Length; i++)
{
e[i].MoveTo(args[i].X, args[i].Y);
}
var _x = args.Average(k => k.X);
var _y = args.Average(k => k.Y);
Orange.MoveTo(
_x,
_y - 8
);
RotationInfo = null;
Update();
},
//g2 = g2
};
return rr;
}