Updating Tooltip in Silverlight 2

I have a control in Silverlight 2 that changes state during application. When its state changes, I want to update the tooltip that comes with it.

I am using ToolTipService:

ToolTipService.SetToolTip(ent.LayoutRoot, "FooBar");

      

which works fine the first time I set the tooltip, but fails the second time I get:

"Object reference not set to an instance of an object"

from somewhere inside Silverlight where I can't get a useful stack trace / breakpoint.

Net etching causes several of these problems, but there are no solutions.

Can anyone shed some light on this?

0


source to share


1 answer


Found the problem - it looks like you can't set the tooltip after creating the control. So now I set the ToolTip in the control constructor and then when it needs updating, the SetToolTop () call works just fine.



0


source







All Articles