using System.ComponentModel.Composition;
using System.Windows;
using TaskIt.Core;
using TaskIt.Modules.Settings.ViewModels;

namespace TaskIt.Modules.Settings.Views
{    
    public partial class SettingsPage
    {
        public SettingsPage()
        {
            InitializeComponent();
            CompositionInitializer.SatisfyImports(this);
            DataContext = PageViewModel;
            Loaded += OnLoaded;
        }

        void OnLoaded(object sender, RoutedEventArgs e)
        {
            Utils.SetFocusAndSelect(txtName);
        }

        [Import]
        public SettingsPageViewModel PageViewModel { get; set; }
    }
}