public void openEditEntry(JournalEntry editEntry)
 {
     //open window
     var window = new ConnectWindow { Owner = this };
     window.LoadEntry(editEntry);
     window.ShowDialog();
 }
        private void doubleClickDataGrid(object sender, SelectionChangedEventArgs e)
        {
            //Cast
            //Create a refrence object, save the refrence object as a selected item
            JournalEntry selected = (JournalEntry)dataGrid_JournalEntries.SelectedItem;

            //open new window with selection
            var window = new ConnectWindow { Owner = this };
            window.LoadEntry(selected);
            window.ShowDialog();
        }