Click here to Skip to main content
12,890,879 members (56,714 online)
Click here to Skip to main content


23 bookmarked
Posted 20 Dec 2010

Custom Data Grid Document Paginator

, 20 Dec 2010 CPOL
This article describes how to create your own custom data grid document paginator.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;

namespace CustomDocumentPaginator
    public class DelegateCommand : ICommand
        private readonly Predicate<object> _canExecute;
        private readonly Action<object> _execute;

        public event EventHandler CanExecuteChanged;

        public DelegateCommand(Action<object> execute)
            : this(execute, null)

        public DelegateCommand(Action<object> execute,
                       Predicate<object> canExecute)
            _execute = execute;
            _canExecute = canExecute;

        public bool CanExecute(object parameter)
            if (_canExecute == null)
                return true;

            return _canExecute(parameter);

        public void Execute(object parameter)

        public void RaiseCanExecuteChanged()
            if (CanExecuteChanged != null)
                CanExecuteChanged(this, EventArgs.Empty);

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Chris L Mullin
Technical Lead System C Healthcare
United Kingdom United Kingdom
Good all rounder (I like to say) with over 12 years development experience in a range languages including Visual C++ , Visual Basic 4/5/6, and now my main area of focus C#.

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170424.1 | Last Updated 20 Dec 2010
Article Copyright 2010 by Chris L Mullin
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid