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

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

            Loaded += ControlLoaded;
        }

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

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