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

namespace TaskIt.Modules.Tasks.Views
{
    public partial class ProjectDetails
    {
        public ProjectDetails()
        {
            InitializeComponent();
            CompositionInitializer.SatisfyImports(this);
            DataContext = ViewModel;

            Loaded += OnLoaded;
        }

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

        [Import]
        public ProjectViewModel ViewModel { get; set; }
    }
}