private static object CoercePosition(DependencyObject d, object value) { PositionalViewportUIContainer owner = (PositionalViewportUIContainer)d; if (owner.positionCoerceCallbacks.Count > 0) { Point position = (Point)value; foreach (var callback in owner.positionCoerceCallbacks) { position = callback(owner, position); } value = position; } return(value); }
private static void OnPositionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { PositionalViewportUIContainer container = (PositionalViewportUIContainer)d; container.OnPositionChanged(e); }