Hi,
In my datagrid each cell of first column have tooltip which is set in cellcontrolattached event. Naw problem is when i make mouse action fast on grid some times tooltip seen any where on grid and it will show untill you refresh the page. Then i set show duration 5 sec to tooltip then it will dissappear in 5 sec(if it is anywhere on screen).
at the same time if tooltip diaply any where on screen and within 5 sec i move my mouse on first column then new tooltip is seen and first tool tip remain on screen So it is possible to remove tooltip forcefully or avy other way to solve this problem ...
Pls reply .......
I've tried to run the code that you pasted but I was not able to. You are using a custom ToolTip. The standard Silverlight ToolTip class (http://msdn.microsoft.com/en-us/library/system.windows.controls.tooltip_properties(v=VS.95).aspx) does not have InitialDelay and ShowDuration.
Could you provide a simplified working sample that reproduces the issue?
Regards,
Yes i have used Silverlight ToolTip,StooltipService class
pls see the following code
CellControl ctrl = (CellControl)e.Cell.Control;
Image imgNotes = null;
if (((ctrl != null && ctrl.Content != null) && (iSelectedSubFormID != 51)
&& (iSelectedSubFormID != 11) && (iSelectedSubFormID != 56) && app.objCompany.ListNotes != null) || ((iSelectedSubFormID == 63) && (iSelectedSubFormID == 51))) {
imgNotes = ((Grid)ctrl.Content).FindName("imgNotes") as Image;
if ((!objComMethods.ExcludedDisplayListColumns(e.Cell.Column.HeaderText.Trim()) || e.Cell.Column.HeaderText.Trim() == "Description")
&& tbItem.ElementSpecRefTaxonomy != null && tbItem.ElementSpecRefTaxonomy.Length > 0
&& e.Cell.Value != null && e.Cell.Value.ToString().Length > 0) {
if (imgNotes != null) {
string sNotes = "";
if (e.Cell.Column.HeaderText.Trim() == "Description") {
var objResultRow = (from p in app.objCompany.ListNotes
where p.PeriodContextrefID == null
&& p.SpecElementID == tbItem.SpecElementId
&& p.SubformId == app.objCompany.ObjectBizElements.GetSubFormID(tbItem.ElementSpecRefTaxonomy)
select p).ToList();
if (objResultRow.Count() > 0)
{
sNotes = "Note [" + Convert.ToDateTime(objResultRow[0].NoteAddedOn).ToShortDateString() + "]:- " + objResultRow[0].ToolTip;
}
if (e.Cell.Column.HeaderText.Trim() != "Description")
var objResultCell = (from p in app.objCompany.ListNotes
where p.PeriodContextrefID == app.objCompany.GetPeriodID(e.Cell.Column.HeaderText.Trim())
if (objResultCell.Count() > 0)
sNotes = "Note [" + Convert.ToDateTime(objResultCell[0].NoteAddedOn).ToShortDateString() + "]:- " + objResultCell[0].ToolTip;
if (sNotes.Trim().Length > 0)
imgNotes.Visibility = Visibility.Visible;
ToolTip ttNotes = new ToolTip
InitialDelay = 0,
ShowDuration = 7000
};
TextBox txtNotes = new TextBox();
txtNotes.Style = app.Resources["NotesTooltipStyle"] as Style;
txtNotes.Text = sNotes;
if (txtNotes.Text.Length > 0)
ttNotes.Content = txtNotes;
ttNotes.Visibility = Visibility.Visible;
ToolTipService.SetToolTip(imgNotes, ttNotes);
else
imgNotes.Visibility = Visibility.Collapsed;
if (imgNotes != null)
catch (Exception)
throw;
Do you use the Silverlight ToolTipService class to attach the tooltips in the CellControlAttached event handler or some other custom tooltip service (like http://tooltipservice.codeplex.com/)?
Could you provide a sample application reproducing the issue so we can investigate it and try to help you?
hi,
My problem is as i said i have tooltip to my first column only.
i give show duration 1 sec to ToolTip . Naw when i press mouseleft button and within 1 sec i drag mouse on second column (or instead first column) and release the mouse button then Tooltip is seen where i release the mouse button. So pls tell me any solution....
Thanks
Do you think you could provide a simple sample showing your specific scenario?
-SteveZ