【发布时间】:2011-10-29 15:47:33
【问题描述】:
我有图片。当鼠标指针指向/在该图像上时,图像描述应该在富文本框中可见吗?怎么样?
请问,有人知道吗?请尽快回复我
提前致谢。
【问题讨论】:
标签: wpf image controls richtextbox
我有图片。当鼠标指针指向/在该图像上时,图像描述应该在富文本框中可见吗?怎么样?
请问,有人知道吗?请尽快回复我
提前致谢。
【问题讨论】:
标签: wpf image controls richtextbox
当属性 (IsMouseOver) 设置为 true 时,您可以将 Trigger 添加到设置 RichTextBox 内容的图像中。查看this link了解更多信息
【讨论】:
private void image1_MouseMove(object sender, MouseEventArgs e) { textBox1.Text = "神仙鱼1"; }
private void image2_MouseMove(object sender, MouseEventArgs e)
{
textBox1.Text = "clownfish";
}
private void image3_MouseMove(object sender, MouseEventArgs e)
{
textBox1.Text = "exotic";
}
private void image4_MouseMove(object sender, MouseEventArgs e)
{
textBox1.Text = "seahorse";
}
【讨论】: