永利娱乐注册-上055118,佐樱h文,鸡蛋美容祛斑方法
wpf中的工具提示(鼠标放在某个控件上弹出的那个东东)用法很简单。1、复杂的工具提示
不光有文字还有图片什么的,只需要使用tooltip属性,给该属性中加控件就可以了。如下,
[html]
<!--复杂的工具提示-->
<button height="25" content="提示工具演示" horizontalalignment="center">
<button.tooltip>
<tooltip background="#60aa4030" foreground="white" hasdropshadow="false"
placement="mouse">
<stackpanel>
<textblock margin="3">提示语:这是什么?</textblock>
<image source="image/kengdiede12306.jpg" stretch="fill"/>
<textblock margin="3">传说中的3亿网站。</textblock>
</stackpanel>
</tooltip>
</button.tooltip>
</button>
<!--复杂的工具提示-->
<button height="25" content="提示工具演示" horizontalalignment="center">
<button.tooltip>
<tooltip background="#60aa4030" foreground="white" hasdropshadow="false"
placement="mouse">
<stackpanel>
<textblock margin="3">提示语:这是什么?</textblock>
<image source="image/kengdiede12306.jpg" stretch="fill"/>
<textblock margin="3">传说中的3亿网站。</textblock>
</stackpanel>
</tooltip>
</button.tooltip>
</button>效果:
至于修改提示的位置,一般修改placement属性。
2、纯文本的提示
这个就不需要加控件了,直接写在tooltip属性里了。
[html]
<button width="200" height="50" content="tooltip属性演示" grid.row="2"
tooltip="纯文本tolltip就用这个啦。" horizontalalignment="center">
</button>
<button width="200" height="50" content="tooltip属性演示" grid.row="2"
tooltip="纯文本tolltip就用这个啦。" horizontalalignment="center">
</button>效果:
3、不能使用tooltip属性的
如果有控件没有tooltip属性,那么就用tooltipservice属性了。
[html]
<button width="200" height="50" grid.row="1" content="tooltipservice演示"
horizontalalignment="center" tooltipservice.initialshowdelay="1"
tooltipservice.tooltip="tooltipservice">
</button>
<button width="200" height="50" grid.row="1" content="tooltipservice演示"
horizontalalignment="center" tooltipservice.initialshowdelay="1"
tooltipservice.tooltip="tooltipservice">
</button>效果:
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
Net Core Web Api项目与在NginX下发布的方法
asp.net core3.1 引用的元包dll版本兼容性问题解决方案
IdentityServer4实现.Net Core API接口权限认证(快速入门)
ASP.NET Core MVC通过IViewLocationExpander扩展视图搜索路径的实现
网友评论