view SilverlightGlimpse/SilverlightValidation/Views/UserView.xaml.cs @ 70:39ba36cc82c5

not sure about these...
author Steven Hollidge <stevenhollidge@hotmail.com>
date Mon, 23 Apr 2012 11:06:29 +0100
parents a0bcd783e612
children 86ed4919b126
line wrap: on
line source

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

namespace SilverlightValidation.Views
{
    public partial class UserView
    {
        private UserViewModel vm;

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

            vm = new UserViewModel(UserModel.Create(), new UserModelValidator());
            this.DataContext = vm;
        }

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