本文整理汇总了C#中System.Windows.Controls.TextBox.BringToFront方法的典型用法代码示例。如果您正苦于以下问题:C# TextBox.BringToFront方法的具体用法?C# TextBox.BringToFront怎么用?C# TextBox.BringToFront使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Controls.TextBox
的用法示例。
在下文中一共展示了TextBox.BringToFront方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Step3_Compare
//.........这里部分代码省略.........
Console.WriteLine(new { v.i, zoom, v.weight }.ToString());
v.Source.ClickEnabled = false;
v.Source.SizeTo(zoom);
var k_x = 500 + Convert.ToInt32(-30 * v.i * zoom) * v.i;
var k_y = 100 + Convert.ToInt32(70 * v.i * zoom);
v.Source.MoveContainerTo(k_x, k_y);
v.Source.AttachContainerTo(this);
var k_Text = new TextBox
{
Background = Brushes.Black,
Width = 60,
Height = 22,
Foreground = Brushes.Yellow,
BorderThickness = new Thickness(0),
Text = "" + v.weight,
IsReadOnly = true
};
bool MouseEnterDisabled = false;
MouseEventHandler MouseEnter =
delegate
{
// cannot remove event from MouseEnter yet
if (MouseEnterDisabled)
return;
k.Source.BringContainerToFront();
k_Text.BringToFront();
};
k.Source.Overlay.MouseEnter += MouseEnter;
k_Text.MoveTo(k_x - 30, k_y - 11).AttachTo(this);
DisposeSorted.Add(
delegate
{
k.Source.OrphanizeContainer();
k_Text.Orphanize();
MouseEnterDisabled = true;
}
);
}
MatrixButton.BringContainerToFront();
MistakeMatrixButton.BringContainerToFront();
return delegate
{
this.Title.Text = "...";
DisposeSorted.ToArray().ForEach(h => h());
MatrixButton.OrphanizeContainer();
MistakeMatrixButton.OrphanizeContainer();
RestartButton.OrphanizeContainer();