Ejemplo n.º 1
0
        private static void OnExpandChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SpriteSelectionViewer control = (SpriteSelectionViewer)d;

            if (!control.IsEmpty)
            {
                control.UpdatePartChanges();
            }
            //control.UpdateExpand();
        }
Ejemplo n.º 2
0
        private static void OnSpriteSizeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SpriteSelectionViewer control = (SpriteSelectionViewer)d;
            Size previousSize             = (Size)e.OldValue;

            if (!control.IsEmpty)
            {
                control.validSpriteSize = control.SpriteSize;
                if (previousSize.Width == 0 || previousSize.Height == 0)
                {
                    control.UpdateEmptyChanged();
                }
                control.UpdatePartChanges();
            }
            else
            {
                control.UpdateEmptyChanged();
            }
        }