private static void OnShowDurationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { InfoControl thisInfoControl = null; thisInfoControl = (InfoControl)d; ToolTipService.SetShowDuration(thisInfoControl, (int)e.NewValue); }
private static void OnInfoWidthChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { double newWidth; InfoControl thisInfoControl = null; thisInfoControl = (InfoControl)d; newWidth = (double)e.NewValue; if (newWidth == 0) { newWidth = double.NaN; } thisInfoControl._tooltipTextBlock.Width = newWidth; }
private static void OnTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { InfoControl thisInfoControl = null; thisInfoControl = (InfoControl)d; if (e.NewValue is string) { thisInfoControl._tooltipTextBlock.Text = ((string)e.NewValue).Replace("\\n", Environment.NewLine); thisInfoControl.ToolTip = thisInfoControl._tooltipTextBlock; } else { thisInfoControl.ToolTip = e.NewValue; } }