/// <summary>
        /// Displays given record page
        /// </summary>
        void ShowRecord(RecordPage recordPage)
        {
            if (openedRecords.Any(rp => rp.recordId == recordPage.recordId))
            {
                openedRecords.First(rp => rp.recordId == recordPage.recordId).Activate();
                return;
            }

            recordPage.Show();
            openedRecords.Add(recordPage);
        }
        private void NewRecord_click(object sender, RoutedEventArgs e)
        {
            RecordPage creationPage = new RecordPage(this);

            ShowRecord(creationPage);
        }
 /// <summary>
 /// Closes given record page
 /// </summary>
 public void CloseRecordPage(RecordPage page)
 {
     openedRecords.Remove(page);
 }
        /// <summary>
        /// Shows record window for record with given id
        /// </summary>
        void EditRecord(int id)
        {
            RecordPage recordPage = new RecordPage(this, Records.First(r => r.Id == id));

            ShowRecord(recordPage);
        }