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); } }
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); } }
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); } }