Example #1
0
        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);
        }
Example #2
0
        private static void OnPositionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            PositionalViewportUIContainer container = (PositionalViewportUIContainer)d;

            container.OnPositionChanged(e);
        }