예제 #1
0
        private static void OnExpandChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SpriteSelectionViewer control = (SpriteSelectionViewer)d;

            if (!control.IsEmpty)
            {
                control.UpdatePartChanges();
            }
            //control.UpdateExpand();
        }
예제 #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();
            }
        }