Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

Validation in Windows Presentation Foundation

, 19 Aug 2006
In this article, I'll walk you through using the built-in Validation classes that exist in Windows Presentation Foundation. I'll then discuss an alternative approach to validation that might suit a richer domain layer, by creating a custom WPF ErrorProvider.
//------------------------------------------------------------------------------
// <autogenerated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.42
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------

namespace PaulStovell.Samples.WpfValidation.Properties {
    using System;
    using System.IO;
    using System.Resources;

    /// <summary>
    ///    A strongly-typed resource class, for looking up localized strings, etc.
    /// </summary>
    // This class was auto-generated by the Strongly Typed Resource Builder
    // class via a tool like ResGen or Visual Studio.NET.
    // To add or remove a member, edit your .ResX file then rerun ResGen
    // with the /str option, or rebuild your VS project.
    class Resources {

        private static System.Resources.ResourceManager _resMgr;

        private static System.Globalization.CultureInfo _resCulture;

        /*FamANDAssem*/
        internal Resources() {
        }

        /// <summary>
        ///    Returns the cached ResourceManager instance used by this class.
        /// </summary>
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        public static System.Resources.ResourceManager ResourceManager {
            get {
                if ((_resMgr == null)) {
                    System.Resources.ResourceManager temp = new System.Resources.ResourceManager("Resources", typeof(Resources).Assembly);
                    _resMgr = temp;
                }
                return _resMgr;
            }
        }

        /// <summary>
        ///    Overrides the current thread's CurrentUICulture property for all
        ///    resource lookups using this strongly typed resource class.
        /// </summary>
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        public static System.Globalization.CultureInfo Culture {
            get {
                return _resCulture;
            }
            set {
                _resCulture = value;
            }
        }
    }
}

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.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Paul Stovell
Octopus Deploy
Australia Australia
My name is Paul Stovell. I live in Brisbane and develop an automated release management product, Octopus Deploy. Prior to working on Octopus I worked for an investment bank in London, and for Readify. I also work on a few open source projects. I am a Microsoft MVP for Client Application Development.
Follow on   Twitter   Google+

| Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 20 Aug 2006
Article Copyright 2006 by Paul Stovell
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid