using System;
using System.ComponentModel.Composition;
using TaskIt.Modules.Help.ViewModels;
using Telerik.Windows;
using Telerik.Windows.Controls.GridView;

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

            grdData.AddHandler(GridViewCellBase.CellDoubleClickEvent, new EventHandler<RadRoutedEventArgs>(OnCellDoubleClick));
        }

        private void OnCellDoubleClick(object sender, RadRoutedEventArgs e)
        {
            ViewModel.OnViewHtml();
        } 

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