示例#1
0
        private static void OnIsOpenPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            // IsOpen dependency property should be defined on a CustomTooltip
            CustomTooltip toolTip = (CustomTooltip)d;

            if (((Boolean)e.NewValue != (Boolean)e.OldValue))
            {
                toolTip.OnIsOpenChanged((Boolean)e.NewValue);
            }
        }
示例#2
0
        private static void OnVerticalOffsetPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            // VerticalOffset dependency property should be defined on a CustomTooltip
            CustomTooltip toolTip = (CustomTooltip)d;

            Double newOffset = (Double)e.NewValue;

            if (newOffset != (Double)e.OldValue)
            {
                toolTip.OnOffsetChanged(0, newOffset);
            }
        }
示例#3
0
        private static void OnHorizontalOffsetPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            // HorizontalOffset dependency property should be defined on a CustomTooltip
            CustomTooltip toolTip = (CustomTooltip)d;

            var newOffset = (Double)e.NewValue;

            // Working around temporary limitations in Silverlight:
            // perform inequality test
            if (newOffset != (Double)e.OldValue)
            {
                toolTip.OnOffsetChanged(newOffset, 0);
            }
        }