예제 #1
0
        private static void OnShowDurationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            InfoControl thisInfoControl = null;

            thisInfoControl = (InfoControl)d;

            ToolTipService.SetShowDuration(thisInfoControl, (int)e.NewValue);
        }
예제 #2
0
        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;
        }
예제 #3
0
        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;
            }
        }