有代码
ToolTip tt;
private void Grid_Loaded(object sender, RoutedEventArgs e)
{
Label l = new Label();
l.Content = "ToolTip";
l.MouseLeftButtonUp += l_MouseLeftButtonUp;
Grid.SetColumn(l, 0);
Grid.SetRow(l, 0);
grid.Children.Add(l);
tt = new ToolTip();
tt.StaysOpen = true;
tt.MouseLeftButtonUp += tt_MouseLeftButtonUp;
tt.Content = "12345";
}
void l_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
tt.IsOpen = true;
}
void tt_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
throw new NotImplementedException();
}
当鼠标单击标签工具提示时显示。然后,如果工具提示鼠标单击 tt_MouseLeftButtonUp 事件永远不会触发。为什么?
Helenr
肥皂起泡泡
相关分类