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

namespace TaskIt.Modules.Help.Views
{
    public partial class Webinars
    {
        public Webinars()
        {
            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 WebinarsViewModel ViewModel { get; set; }
    }
}