Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
440
XamGridToolTip
posted

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Hi,

I have issue with Tooltip in XamGrid(Silverlight)

I have created columns in ColumnLayoutAssign Event like

 

 

 

CellTemp = new StringBuilder

();

CellTemp.Append(

 

 

"<DataTemplate "

);

CellTemp.Append(

 

 

"xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' "

);

CellTemp.Append(

 

 

"xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'> "

);

CellTemp.Append(

 

 

"<Grid>"

);

CellTemp.Append(

 

 

" <Image x:Name=\"imgNotes\" Source=\"../../images/new_notes-1.png\" Visibility=\"Collapsed\" Height=\"10\""

);

CellTemp.Append(

 

 

" HorizontalAlignment=\"Left\" Margin=\"0,0,0,0\" VerticalAlignment=\"Top\"></Image>"

);

CellTemp.Append(

 

 

" <TextBlock x:Name=\"txtNormal\" Text=\"{Binding Description}\" Margin=\"11,0,11,0\" HorizontalAlignment=\"Left\"/>"

);

 

 

 

CellTemp.Append(" </Grid>"

);

CellTemp.Append(

 

 

" </DataTemplate>"

);

i want tool tooltip on mouse over on "

 

 

imgNotes" So that i set from CellControlAttached

events.

 

 

Image imgNotes = null

;

 

 

 

imgNotes = ((Grid)ctrl.Content).FindName("imgNotes") as Image

;

ToolTip

 

 

 

ttNotes = new

ToolTip

{

InitialDelay = 0,

ShowDuration =

 

 

int

.MaxValue

};

 

 

 

TextBox txtNotes = new TextBox

();

txtNotes.Style =

 

 

Globals.Resources["NotesTooltip"] as Style

;

txtNotes.Text = sNotes;

 

 

 

ToolTipService

.SetToolTip(imgNotes, ttNotes);

 

It is working ... But when i move mouse quickly on image or (if i press Left mouse button on image and i relese it somewhere on

Grid it show tooltip where i release mouse.) tooltip show untill i referesh page.

Is there any solution to solve this issue. or mouse Enter and Leave events for Cell ...

 

Please Reply

Parents
No Data
Reply
  • 40030
    Offline posted

    Hi, 

    Have you looked into using the xamGrid's tooltip support: 

    http://help.infragistics.com/NetAdvantage/Silverlight/2011/1/CLR4.0/?page=xamGrid_ToolTips.html

    -SteveZ 

Children
No Data