private static void OnCurrentItemIndexPropertychanged(DependencyObject element, DependencyPropertyChangedEventArgs e)
        {
            ActiveTileList target = element as ActiveTileList;

            if (target == null)
            {
                return;
            }

            target.RefreshActiveStatus();
        }
        private static void OnScrollCommand(object target, ExecutedRoutedEventArgs args)
        {
            ActiveTileList control = target as ActiveTileList;

            if (control == null)
            {
                return;
            }

            if (args.Command == PageLeftCommand)
            {
                control.ScrollLeft();
            }
            else if (args.Command == PageRightCommand)
            {
                control.ScrollRight();
            }
        }
        private static void OnQueryScrollCommand(object target, CanExecuteRoutedEventArgs args)
        {
            args.CanExecute = true;
            ActiveTileList control = target as ActiveTileList;

            if (control == null)
            {
                return;
            }

            if (args.Command == PageLeftCommand)
            {
                args.CanExecute = (control.ItemCount > 0) && (control.CurrentItemIndex > 0);
            }
            else if (args.Command == PageRightCommand)
            {
                args.CanExecute = (control.ItemCount > 0) && (control.CurrentItemIndex < (control.ItemCount - 1));
            }
            args.ContinueRouting = true;
            args.Handled         = true;
        }