private static void OnCommandParamChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
        {
            ScrollViewerDetectEnd listview = o as ScrollViewerDetectEnd;

            if (listview == null)
            {
                return;
            }
            if (listview._ListviewScrollChangedHandler != null)
            {
                listview.AddHandler(ScrollViewer.ScrollChangedEvent, listview._ListviewScrollChangedHandler);
            }

            listview.RaiseCommandParamChanged(e);
        }
        private static void HandleScrollChanged(object sender, ScrollChangedEventArgs e)
        {
            ScrollBar             sb       = e.OriginalSource as ScrollBar;
            ScrollViewerDetectEnd listview = sender as ScrollViewerDetectEnd;

            if (sb.Orientation == Orientation.Horizontal)
            {
                return;
            }
            if (sb.Value == sb.Maximum && listview.CommandParameter != null)
            {
                if (listview.Command.CanExecute(listview.CommandParameter))
                {
                    listview.Command.Execute(listview.CommandParameter);
                }
            }
        }