标签:效果 事件 cli dev out code class tcl info
效果:
主窗体打开弹窗ModifyTextDialog
private void ModifyTextClick(object sender, RoutedEventArgs e)
{
ModifyTextDialog dialog = new ModifyTextDialog(myTextBlock.Text);
var r= dialog.ShowDialog();
//得到弹窗返回结果,如果是true
if (r.HasValue && r.Value==true)
{
myTextBlock.Text = dialog.myTextBox.Text;
}
}
窗体事件:
private void OkClick(object sender, RoutedEventArgs e)
{
//设置结果
this.DialogResult = true;
this.Close();
}
private void CancleClick(object sender, RoutedEventArgs e)
{
this.DialogResult = false;
this.Close();
}
MoveAndResizeControl 的move and rezise TextBlock
文本框,右键“修改文字内容”
标签:效果 事件 cli dev out code class tcl info
原文地址:https://www.cnblogs.com/Lulus/p/12717999.html