Quick Silverlight tip: How to make ToolTip works in beta 1

If you paid attention, there is neither ToolTip  nor ToolTipService control in MSDN library, however, you can see it via intellisense in Visual Studio. If you’ll try to use it, you’ll get AG_E_PARSER_PROPERTY_NOT_FOUND XamlParser exception. The reason is, that ToolTip as well as ToolTip service come from extended controls set. Thus in order to use it, you’ll have to make explicit reference to the dll.  So, following will work

<UserControl x:Class="FloraRIA.Page"
    xmlns="http://schemas.microsoft.com/client/2007"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:extended="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"      

…..

<extended:ToolTipService.ToolTip>
                   <ToolTip Content="Hello world!"/>
</extended:ToolTipService.ToolTip>

Happy coding

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DotNetKicks
  • DZone
  • Live
  • Reddit
  • TwitThis
  • email
  • Slashdot
  • StumbleUpon

You may also be interested with:

  1. Quick IT tip: How to build bootable USB stick

2 Responses to “Quick Silverlight tip: How to make ToolTip works in beta 1”

  1. Tamir Khason Says:

    Yeah, except the fact, that in SL 2.0 controls you should not provide additional namespace, due to fact, that it is *the* namespace :)

  2. Justin-Josef Angel [MVP] Says:

    Hi Tamir,

    You should have a look at the Silverlight Control Example. All the syntax for making the 5 SL 2.0 Control families is listed there.

Leave a Reply

Recommended

 


Sponsor


Partners

WPF Disciples
Dreamhost
Code Project
Switched to Better Place

Together