I can set properties on single control tooltip like duration. But what i need is to set longer duration for ALL tooltips in entire application - all windows, all user controls etc. Is there any clean way to achieve it? Thank you.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can override the meta-data for the ToolTipService.ShowDurationProperty
like so:
public partial class App : System.Windows.Application {
static App() {
ToolTipService.ShowDurationProperty.OverrideMetadata(typeof(UIElement),
new FrameworkPropertyMetadata(1000));
}
}
The above will make the ToolTip duration 1 second for all UIElements.