Forcing a WPF tooltip to stay on the screen

前端 未结 10 1944
别那么骄傲
别那么骄傲 2020-12-08 18:24

I have a tooltip for a Label and I want it to stay open until the user moves the mouse to a different control.

I have tried the following properties on the tooltip:<

10条回答
  •  醉梦人生
    2020-12-08 18:30

    Just put this code in initialization section.

    ToolTipService.ShowDurationProperty.OverrideMetadata(
        typeof(DependencyObject), new FrameworkPropertyMetadata(Int32.MaxValue));
    

提交回复
热议问题