private void OnSelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (dataGrid.CurrentItem == null) return;
try
{
var window =
(CardViewWindowPane) Package.FindToolWindow(typeof (CardViewWindowPane), 0, true);
if ((null == window) || (null == window.Frame))
throw new NotSupportedException(VisualStudio.Resources.CanNotCreateWindow);
window.Caption = VisualStudio.Resources.CardSetWindowTitle.Replace("%%project%%",
_currentCardCollection.ProjectId);
//window.Bind(dataGrid.CurrentItem as MingleCard, _currentCardCollection);
var windowFrame = (IVsWindowFrame) window.Frame;
ErrorHandler.ThrowOnFailure(windowFrame.Show());
}
catch (Exception ex)
{
TraceLog.Exception(new StackFrame().GetMethod().Name, ex);
MessageBox.Show(ex.Message);
}
}