view SilverlightValidation/SilverlightValidation/Views/UserListView.xaml.cs @ 58:241e2f22ed3c

Latest version
author Steven Hollidge <stevenhollidge@hotmail.com>
date Sat, 21 Apr 2012 15:06:48 +0100
parents
children 188f8b366e87
line wrap: on
line source

using System.Windows.Browser;
using System.Windows.Input;
using SilverlightValidation.Data;
using SilverlightValidation.ViewModels;
using SilverlightValidation.Validators;

namespace SilverlightValidation.Views
{
    public partial class UserListView
    {
        private UserListViewModel vm;

        public UserListView()
        {
            InitializeComponent();
            HtmlPage.Document.SetProperty("title", "Silverlight Validation");

            vm = new UserListViewModel(Factory.CreateUserModels(), new UserModelValidator());
            this.DataContext = vm;
        }

        private void DatePicker_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key != Key.Tab)
                e.Handled = true;
        }
    }
}