开发者

Text Input Panel not showing up in WPF Pop Up

开发者 https://www.devze.com 2023-03-16 05:13 出处:网络
In a touch enabled application we want to display a pop up for开发者_高级运维 text input. But for some reason the touch events won\'t invoke the tooltip for the touch input panel, which normally shows

In a touch enabled application we want to display a pop up for开发者_高级运维 text input.

But for some reason the touch events won't invoke the tooltip for the touch input panel, which normally shows up when touching in a text input field.

Is there a way to invoke this tooltip programmatically?


Might want to try something like this:

private void OnTouchEnter(object sender, RoutedEventArgs e)
{
    ToolTip tt = new ToolTip();
    tt.Content = "My tooltip text";
    myComponentName.ToolTip=tt;
    tt.IsOpen = true;
}

If you want to be fancy, you can add a timer or something to make it go away after a little bit.

0

精彩评论

暂无评论...
验证码 换一张
取 消