Silverlight:在工具提示中添加链接或按钮以及它们各自的事件[已解决] [英] Silverlight: Adding Link or Button inside Tooltip and the respective events for them [Solved]

查看:84
本文介绍了Silverlight:在工具提示中添加链接或按钮以及它们各自的事件[已解决]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,专家,

有人可以帮助我根据我的设计编写自定义工具提示吗?我需要创建一个工具提示,其中的工具提示中有一个链接或按钮.设计很容易,但是问题出在工具提示中为按钮编写事件.如果在其中输入鼠标,如何使工具提示停留在此处,以便可以单击工具提示中的按钮.

反正有可能吗?请尽快帮助我.我使用的是Silverlight 3,Visual Studio 2008 SP1.

Hi Experts,

Can anyone help me writing a custom tooltip according to my design? I need to create a Tooltip where I have a Link or Button inside the Tooltip. Designing is easy but the problem comes here on writing the event for button inside the tooltip. How can I make the tooltip stay there if I enter my mouse inside it so that I can click on the button inside the tooltip.

Is it possible in anyway? Please help me regarding the same asap. I am using Silverlight 3, Visual Studio 2008 SP1.

推荐答案

感谢彼得指出了同样的观点.我按照您提到的方式实现了它,并且还想告诉它运行得很好.

就我而言,它需要做一些进一步的调整才能获得数据,就像我在使用带有工具提示的列表内的数据模板一样.

无论如何,我已解决了该问题,最后但同样重要的是,感谢您的宝贵帮助. :thumbsup:
Thanks Pete for pointing out the same. I implemented it as mentioned by you & also want to tell it is working perfectly.

It my case, it required some more tweaks to get the data as I was using data template inside the list which has the tooltip.

Anyway I resolved it & last but not least thanks for your valuable help. :thumbsup:


真正做到这一点的唯一方法是显示一些在WPF中称为装饰器的东西.基本上,您需要将鼠标悬停并在短时间后显示装饰物.

现在,Silverlight本身不支持装饰器,因此您必须伪造它们.一种方法是创建一个折叠的容器(例如Grid),并在显示装饰器时设置其位置.
The only way to really do this would be to display something that, in WPF, is called an adorner. Basically, you''d need to hook into the mouseover and display the adorner after a short period of time.

Now, adorners aren''t natively supported by Silverlight, so you have to fake them. One way to do this is to create a collapsed container (such as a Grid), and set its location when you display the adorner.


这篇关于Silverlight:在工具提示中添加链接或按钮以及它们各自的事件[已解决]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆